Bug 1498668 [wpt PR 13489] - Fix handling of about:blank in lint., a=testonly
authorjgraham <james@hoppipolla.co.uk>
Tue, 16 Oct 2018 09:58:39 +0000
changeset 500230 db8a954e5f2c7ad3dc85d080cde5c1ed73dad6cc
parent 500229 6a1c2ae13ec5607eec77be4260e58f99f042fc2c
child 500231 90fbdef8b5e48ab852ee5429229bbd4df1dbb988
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: