Bug 1498668 [wpt PR 13489] - Fix handling of about:blank in lint., a=testonly
☠☠ backed out by 09dd66ffc95a ☠ ☠
authorjgraham <james@hoppipolla.co.uk>
Tue, 16 Oct 2018 09:58:39 +0000
changeset 500082 f9fc9c2b198e7929d48cacc29100f25ab953f8b9
parent 500081 e15fb51620aa413913f7acd1b56f0f1e508c3c73
child 500083 824b82d103cab9da1532ca7e989382a0820f207f
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1498668, 13489
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1498668 [wpt PR 13489] - Fix handling of about:blank in lint., a=testonly Automatic update from web-platform-testsFix handling of about:blank in lint. (#13489) about:blank should be unconditionally allowed as a reference. Also add an infrastructure test that actually uses this to ensure it keeps working. -- wpt-commits: 6279ae5cc55eb91bb086ab1d0f1969c180cbedc2 wpt-pr: 13489
testing/web-platform/tests/infrastructure/assumptions/blank.html
testing/web-platform/tests/tools/lint/lint.py
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/assumptions/blank.html
@@ -0,0 +1,2 @@
+<title>Blank Document</title>
+<link rel=match href="about:blank">
--- a/testing/web-platform/tests/tools/lint/lint.py
+++ b/testing/web-platform/tests/tools/lint/lint.py
@@ -453,20 +453,25 @@ def check_parsed(repo_root, path, f):
         return [("PARSE-FAILED", "Unable to parse file", path, None)]
 
     if source_file.type == "manual" and not source_file.name_is_manual:
         errors.append(("CONTENT-MANUAL", "Manual test whose filename doesn't end in '-manual'", path, None))
 
     if source_file.type == "visual" and not source_file.name_is_visual:
         errors.append(("CONTENT-VISUAL", "Visual test whose filename doesn't end in '-visual'", path, None))
 
+    about_blank_parts = urlsplit("about:blank")
     for reftest_node in source_file.reftest_nodes:
         href = reftest_node.attrib.get("href", "").strip(space_chars)
         parts = urlsplit(href)
-        if (parts.scheme or parts.netloc) and parts != urlsplit("about:blank"):
+
+        if parts == about_blank_parts:
+            continue
+
+        if (parts.scheme or parts.netloc):
             errors.append(("ABSOLUTE-URL-REF",
                      "Reference test with a reference file specified via an absolute URL: '%s'" % href, path, None))
             continue
 
         ref_url = urljoin(source_file.url, href)
         ref_parts = urlsplit(ref_url)
 
         if source_file.url == ref_url: