diff --git a/scripts/get-latest-platform-tests.js b/scripts/get-latest-platform-tests.js index 9d90ea9..5ec2d14 100644 --- a/scripts/get-latest-platform-tests.js +++ b/scripts/get-latest-platform-tests.js @@ -19,7 +19,7 @@ process.on("unhandledRejection", err => { // 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 = "0050cfbe145bc9c24981186fa47e714147c1674d"; +const commitHash = "d99193c80fc1d52f5a33bf8e8de7e7363a6bfa20"; // Have to use RawGit as JSDOM.fromURL checks Content-Type header. const urlPrefix = `https://rawgit.com/w3c/web-platform-tests/${commitHash}/url/`; diff --git a/test/web-platform.js b/test/web-platform.js index c701058..45362e5 100644 --- a/test/web-platform.js +++ b/test/web-platform.js @@ -150,6 +150,22 @@ describe("Web platform tests", () => { } }); + describe("bad base URL", () => { + for (const rawExpected of parsingTestCases) { + if (typeof rawExpected === "string" || !rawExpected.failure) { + continue; + } + + const expected = { + input: "about:blank", + base: rawExpected.input, + failure: true + }; + + test(`<${expected.input}> against <${expected.base}>`, testURL(expected)); + } + }); + describe("setters", () => { for (const key of Object.keys(setterTestData)) { if (key === "comment") {