Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d

This commit is contained in:
Josh Matthews 2017-11-15 12:15:13 -05:00
parent 85fa6409bb
commit c227604a2c
997 changed files with 45660 additions and 14650 deletions

View file

@ -515,14 +515,26 @@ def check_parsed(repo_root, path, f, css_mode):
if all(seen_elements[name] for name in required_elements):
break
if source_file.testdriver_nodes:
if len(source_file.testdriver_nodes) > 1:
errors.append(("MULTIPLE-TESTDRIVER",
"More than one <script src='/resources/testdriver.js'>", path, None))
testdriver_vendor_nodes = source_file.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src='/resources/testdriver-vendor.js']")
if not testdriver_vendor_nodes:
errors.append(("MISSING-TESTDRIVER-VENDOR",
"Missing <script src='/resources/testdriver-vendor.js'>", path, None))
else:
if len(testdriver_vendor_nodes) > 1:
errors.append(("MULTIPLE-TESTDRIVER-VENDOR",
"More than one <script src='/resources/testdriver-vendor.js'>", path, None))
for element in source_file.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src]"):
src = element.attrib["src"]
for name in ["testharness", "testharnessreport"]:
for name in ["testharness", "testharnessreport", "testdriver", "testdriver-vendor"]:
if "%s.js" % name == src or ("/%s.js" % name in src and src != "/resources/%s.js" % name):
errors.append(("%s-PATH" % name.upper(), "%s.js script seen with incorrect path" % name, path, None))
return errors
class ASTCheck(object):