Bug 1541730 [wpt PR 16180] - Add a test for missing closing parenthesis in functional pseudo-selector., a=testonly
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 17 May 2019 11:02:03 +0000
changeset 477081 8029c052b23ba2f6c3f51bf18ae9451562f0670a
parent 477080 46b991f9ec4736611d902da78160e6d2879a7920
child 477082 bef4775407fb5f23c322808508c2b9ce4850a193
push id36116
push usershindli@mozilla.com
push dateThu, 06 Jun 2019 10:00:05 +0000
treeherdermozilla-central@fee989d27558 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1541730, 16180, 142167
milestone69.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 1541730 [wpt PR 16180] - Add a test for missing closing parenthesis in functional pseudo-selector., a=testonly Automatic update from web-platform-tests Add a test for missing closing parenthesis in functional pseudo-selector. (#16180) This was reviewed in https://bugs.webkit.org/show_bug.cgi?id=142167. -- wpt-commits: a8e6f75e3f7477bcaeff7516a3c540cc4680e7e2 wpt-pr: 16180
testing/web-platform/tests/dom/nodes/selectors.js
--- a/testing/web-platform/tests/dom/nodes/selectors.js
+++ b/testing/web-platform/tests/dom/nodes/selectors.js
@@ -368,16 +368,20 @@ var validSelectors = [
   {name: "General sibling combinator, whitespace before",                                                           selector: "#sibling-p2\t\r\n~#sibling-p3",                            expect: ["sibling-p3"],                   level: 3, testType: TEST_QSA | TEST_MATCH},
   {name: "General sibling combinator, no whitespace",                                                               selector: "#sibling-p2~#sibling-p3",                                  expect: ["sibling-p3"],                   level: 3, testType: TEST_QSA | TEST_MATCH},
 
   // Group of selectors (comma)
   {name: "Syntax, group of selectors separator, surrounded by whitespace", selector: "#group em\t\r \n,\t\r \n#group strong", expect: ["group-em1", "group-strong1"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Syntax, group of selectors separator, whitespace after",         selector: "#group em,\t\r\n#group strong",         expect: ["group-em1", "group-strong1"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Syntax, group of selectors separator, whitespace before",        selector: "#group em\t\r\n,#group strong",         expect: ["group-em1", "group-strong1"], level: 1, testType: TEST_QSA | TEST_MATCH},
   {name: "Syntax, group of selectors separator, no whitespace",            selector: "#group em,#group strong",               expect: ["group-em1", "group-strong1"], level: 1, testType: TEST_QSA | TEST_MATCH},
+
+  // ::slotted (shouldn't match anything, but is a valid selector)
+  {name: "Slotted selector", selector: "::slotted(foo)", expect: [], level: 3, testType: TEST_QSA},
+  {name: "Slotted selector (no matching closing paren)", selector: "::slotted(foo", expect: [], level: 3, testType: TEST_QSA},
 ];
 
 
 /*
  * These selectors are intended to be used with the find(), findAll() and matches() methods.  Expected results
  * should be determined under the assumption that :scope will be prepended to the selector where appropriate,
  * in accordance with the specification.
  *