4 <script src=
"../../../resources/js-test.js"></script>
8 var element
= document
.body
;
9 ["matches", "webkitMatchesSelector"].forEach(function(func
)
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!')");