OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script src="resources/shadow-dom.js"></script> | 5 <script src="resources/shadow-dom.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <div id='sandbox'></div> | 8 <div id='sandbox'></div> |
9 <pre id='console'></pre> | 9 <pre id='console'></pre> |
10 <script> | 10 <script> |
11 description('Test for crbug.com/273960. Vendor prefixed pseudo elements should n
ot cause DOM exception 12 when using querySelector, querySelectorAll and webkitM
atchesSelector.'); | 11 description('Test for crbug.com/273960. Vendor prefixed pseudo elements should n
ot cause DOM exception 12 when using querySelector, querySelectorAll and webkitM
atchesSelector.'); |
12 | 12 |
13 var sandbox = document.getElementById('sandbox'); | 13 var sandbox = document.getElementById('sandbox'); |
14 | 14 |
15 sandbox.appendChild(document.createElement("input")); | 15 sandbox.appendChild(document.createElement("input")); |
16 shouldBeFalse('sandbox.firstChild.webkitMatchesSelector("input[type=\'search\']:
:-webkit-search-decoration")'); | 16 shouldBeFalse('sandbox.firstChild.webkitMatchesSelector("input[type=\'search\']:
:-webkit-search-decoration")'); |
17 shouldBeNull('sandbox.firstChild.querySelector("input[type=\'search\']::-webkit-
search-decoration")'); | 17 shouldBeNull('sandbox.firstChild.querySelector("input[type=\'search\']::-webkit-
search-decoration")'); |
18 shouldBe('sandbox.firstChild.querySelectorAll("input[type=\'search\']::-webkit-s
earch-decoration").length', '0'); | 18 shouldBe('sandbox.firstChild.querySelectorAll("input[type=\'search\']::-webkit-s
earch-decoration").length', '0'); |
19 | 19 |
20 sandbox.innerHTML = ''; | 20 sandbox.innerHTML = ''; |
| 21 |
| 22 sandbox.appendChild( |
| 23 createDOM('div', {'id': 'host'}, |
| 24 createShadowRoot( |
| 25 createDOM('div', {'pseudo': 'x-pseudo', 'part': 'x-part'})))); |
| 26 |
| 27 shouldBeFalse('sandbox.firstChild.webkitMatchesSelector("div::x-pseudo")'); |
| 28 shouldBeFalse('sandbox.firstChild.webkitMatchesSelector("div::x-part")'); |
| 29 shouldBeNull('sandbox.firstChild.querySelector("div::x-pseudo")'); |
| 30 shouldBeNull('sandbox.firstChild.querySelector("div::x-part")'); |
| 31 shouldBe('sandbox.firstChild.querySelectorAll("div::x-pseudo").length', '0'); |
| 32 shouldBe('sandbox.firstChild.querySelectorAll("div::x-part").length', '0'); |
| 33 |
| 34 sandbox.innerHTML = ''; |
21 </script> | 35 </script> |
22 </body> | 36 </body> |
23 </html> | 37 </html> |
24 | 38 |
OLD | NEW |