From f8d543ae1dc3e610af7eb6b47273193a7005a6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 6 Jul 2018 17:25:12 +0000 Subject: [PATCH] Bug 1465104 [wpt PR 11229] - Move and simplify element.matches("*") test so that it works, a=testonly Automatic update from web-platform-testsMove and simplify element.matches("*") test so that it works (#11229) The reason it didn't work before was because in Element-matches.js, it's always `someElement.matches("*")` being tested, which is the only thing that could be tested as there's not other "context" or "reference node" involved in the API surface. All of TEST_FIND is actually dead code, so dropping that is harmless. Fixes https://github.com/web-platform-tests/wpt/issues/11212. -- wpt-commits: 7c0611d2ea5792fa8d9829d05aff1ab7fa648c67 wpt-pr: 11229 --- testing/web-platform/meta/MANIFEST.json | 2 +- testing/web-platform/tests/dom/nodes/selectors.js | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index b87755c1964c0..42d1e76382d6e 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -564695,7 +564695,7 @@ "testharness" ], "dom/nodes/selectors.js": [ - "d23a6e88e198f4f0f4495d6fd2775408d0635371", + "be39e37d8486cc0a31bed9e1f1ee1176fa83b5d0", "support" ], "dom/ranges/Range-attributes.html": [ diff --git a/testing/web-platform/tests/dom/nodes/selectors.js b/testing/web-platform/tests/dom/nodes/selectors.js index 529eb1ed384ab..587779b7da0e3 100644 --- a/testing/web-platform/tests/dom/nodes/selectors.js +++ b/testing/web-platform/tests/dom/nodes/selectors.js @@ -70,7 +70,7 @@ var validSelectors = [ {name: "Type selector, matching body element", selector: "body", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_QSA}, // Universal Selector - // Testing "*" for entire an entire context node is handled separately. + {name: "Universal selector, matching all elements", selector: "*", expect: ["universal", "universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1", "universal-p2", "universal-a1", "universal-address1", "universal-code2", "universal-a2"], level: 2, testType: TEST_MATCH}, {name: "Universal selector, matching all children of element with specified ID", selector: "#universal>*", expect: ["universal-p1", "universal-hr1", "universal-pre1", "universal-p2", "universal-address1"], level: 2, testType: TEST_QSA | TEST_MATCH}, {name: "Universal selector, matching all grandchildren of element with specified ID", selector: "#universal>*>*", expect: ["universal-code1", "universal-span1", "universal-a1", "universal-code2"], level: 2, testType: TEST_QSA | TEST_MATCH}, {name: "Universal selector, matching all children of empty element with specified ID", selector: "#empty>*", expect: [] /*no matches*/, level: 2, testType: TEST_QSA}, @@ -449,10 +449,6 @@ var validSelectors = [ var scopedSelectors = [ //{name: "", selector: "", ctx: "", ref: "", expect: [], level: 1, testType: TEST_FIND | TEST_MATCH}, - // Universal Selector - {name: "Universal selector, matching all descendants of the specified reference element", selector: "*", ctx: "#universal", expect: ["universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1", - "universal-p2", "universal-a1", "universal-address1", "universal-code2", "universal-a2"], unexpected: ["universal", "empty"], level: 2, testType: TEST_FIND | TEST_MATCH}, - // Attribute Selectors // - presence [att] {name: "Attribute presence selector, matching align attribute with value", selector: ".attr-presence-div1[align]", ctx: "#attr-presence", expect: ["attr-presence-div1"], level: 2, testType: TEST_FIND | TEST_MATCH},