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

Spec update: cleanup API for file and non-special URLs #71

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

domenic
Copy link
Member

@domenic domenic commented Feb 2, 2017

Follows whatwg/url#224.

@annevk
Copy link
Contributor

annevk commented Feb 2, 2017

diff --git a/scripts/get-latest-platform-tests.js b/scripts/get-latest-platform-tests.js
index b9b39c7..81ba9e6 100644
--- a/scripts/get-latest-platform-tests.js
+++ b/scripts/get-latest-platform-tests.js
@@ -14,7 +14,7 @@ const request = require("request");
 // 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url
 // 2. Press "y" on your keyboard to get a permalink
 // 3. Copy the commit hash
-const commitHash = "512b95eae6cbfdef4c6faf4d167aaf72671f35ea";
+const commitHash = "04b079668a8bc334655b14dba2e981f3b763979c";
 
 const sourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/urltestdata.json`;
 const setterSourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/setters_tests.json`;
diff --git a/src/url-state-machine.js b/src/url-state-machine.js
index 27fe564..0b08dce 100644
--- a/src/url-state-machine.js
+++ b/src/url-state-machine.js
@@ -825,7 +825,7 @@ URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) {
       this.parseError = true;
       return failure;
     } else if (this.stateOverride && this.buffer === "" &&
-               (this.url.username === "" || this.url.password === "" || this.url.port !== null)) {
+               (this.url.username !== "" || this.url.password !== "" || this.url.port !== null)) {
       this.parseError = true;
       return false;
     }

😉

(I updated the hash since I rebased the tests, but there was never a good reason to rebase them...)

@domenic domenic merged commit cad6187 into master Feb 8, 2017
@domenic domenic deleted the spec-update-224 branch February 8, 2017 18:38
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.

2 participants