Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(goto): assume http:// for localhost navigations #825

Merged
merged 2 commits into from
Feb 5, 2020

Conversation

pavelfeldman
Copy link
Member

Fixes #803

@@ -28,6 +28,10 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
await page.goto(server.EMPTY_PAGE);
expect(page.url()).toBe(server.EMPTY_PAGE);
});
fit('should use http for no protocol', async({page, server}) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this test localhost url? Also, no fit please :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, bot's aren't happy with fits!

@@ -211,6 +211,12 @@ class Helper {
tokens.push('$');
return new RegExp(tokens.join(''));
}

static completeUserURL(urlString: string): string {
if (urlString.startsWith('localhost') || urlString.startsWith('127.0.0.1'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps allow 0:0:0:0:0:0:0:1 and ::1 as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd strongly encourage using URLs where urls are required. localhost and 127.0.0.1 are too wide-spread to ignore, but ipv6 is not (yet).

@pavelfeldman pavelfeldman merged commit bdf8e39 into microsoft:master Feb 5, 2020
@pavelfeldman pavelfeldman deleted the httppref branch April 17, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] browserType chromium and webkit produces error on schemeless url
3 participants