OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 </head> | |
6 <body class="foo"> | |
7 <script> | |
8 var element = document.body; | |
9 ["matches", "webkitMatchesSelector"].forEach(function(func) | |
10 { | |
11 shouldThrow("element." + func + "()"); | |
12 shouldBeTrue("element." + func + "('body')"); | |
13 shouldBeTrue("element." + func + "('html > .foo')"); | |
14 shouldBeFalse("element." + func + "('html')"); | |
15 shouldBeFalse("element." + func + "('html > .bar')"); | |
16 shouldThrow("element." + func + "('')"); | |
17 shouldThrow("element." + func + "('!invalid!')"); | |
18 }); | |
19 </script> | |
20 </body> | |
21 </html> | |
OLD | NEW |