Bug 1465104 [wpt PR 11229] - Move and simplify element.matches("*") test so that it works, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Fri, 06 Jul 2018 17:25:12 +0000
changeset 425893 f683999cbef1b9561302c4d5452a100cbd47de99
parent 425892 918b83dd7b01042e026c49ba568366b1c9f4f444
child 425894 0d5c1298c115f6ccc0b1e19e7494b1dd72ae7f18
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1465104, 11229, 11212
milestone63.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 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
testing/web-platform/tests/dom/nodes/selectors.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -564690,17 +564690,17 @@
    "3825b5adbbd61c2eee537956079ec671e0d31911",
    "testharness"
   ],
   "dom/nodes/rootNode.html": [
    "9e57a68d7e39fcee75bdfb737de93bd6b6236b3a",
    "testharness"
   ],
   "dom/nodes/selectors.js": [
-   "d23a6e88e198f4f0f4495d6fd2775408d0635371",
+   "be39e37d8486cc0a31bed9e1f1ee1176fa83b5d0",
    "support"
   ],
   "dom/ranges/Range-attributes.html": [
    "26309db23c48cfbd5aacdb970bc71a588f24e3eb",
    "testharness"
   ],
   "dom/ranges/Range-cloneContents.html": [
    "a932f2c082bf805d33dfcbc52f2ecf930d50da29",
--- a/testing/web-platform/tests/dom/nodes/selectors.js
+++ b/testing/web-platform/tests/dom/nodes/selectors.js
@@ -65,17 +65,17 @@ var invalidSelectors = [
 var validSelectors = [
   // Type Selector
   {name: "Type selector, matching html element", selector: "html", expect: ["html"],          exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Type selector, matching html element", selector: "html", expect: [] /*no matches*/, exclude: ["document"],                        level: 1, testType: TEST_QSA},
   {name: "Type selector, matching body element", selector: "body", expect: ["body"],          exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {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},
   {name: "Universal selector, matching all descendants of element with specified ID",    selector: "#universal *",   expect: ["universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1", "universal-p2", "universal-a1", "universal-address1", "universal-code2", "universal-a2"], level: 2, testType: TEST_QSA | TEST_MATCH},
 
   // Attribute Selectors
   // - presence                  [att]
   {name: "Attribute presence selector, matching align attribute with value",                    selector: ".attr-presence-div1[align]",                             expect: ["attr-presence-div1"],                                                                   level: 2, testType: TEST_QSA | TEST_MATCH},
@@ -444,20 +444,16 @@ var validSelectors = [
  * collection as a NodeList, an Array and, if there is only a single element, an Element node.
  *
  * Note: Interactive pseudo-classes (:active :hover and :focus) have not been tested in this test suite.
  */
 
 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},
   {name: "Attribute presence selector, matching align attribute with empty value",              selector: ".attr-presence-div2[align]",                             ctx: "#attr-presence", expect: ["attr-presence-div2"],                                             level: 2, testType: TEST_FIND | TEST_MATCH},
   {name: "Attribute presence selector, matching title attribute, case insensitivity",           selector: "[TiTlE]",                                                ctx: "#attr-presence", expect: ["attr-presence-a1", "attr-presence-span1"], exclude: ["xhtml"],    level: 2, testType: TEST_FIND | TEST_MATCH},
   {name: "Attribute presence selector, not matching title attribute, case sensitivity",         selector: "[TiTlE]",                                                ctx: "#attr-presence", expect: [],                                          exclude: ["html"],     level: 2, testType: TEST_FIND | TEST_MATCH},
   {name: "Attribute presence selector, matching custom data-* attribute",                       selector: "[data-attr-presence]",                                   ctx: "#attr-presence", expect: ["attr-presence-pre1", "attr-presence-blockquote1"],                level: 2, testType: TEST_FIND | TEST_MATCH},
   {name: "Attribute presence selector, not matching attribute with similar name",               selector: ".attr-presence-div3[align], .attr-presence-div4[align]", ctx: "#attr-presence", expect: [] /*no matches*/,                                                  level: 2, testType: TEST_FIND},