| Index: LayoutTests/fast/dom/Element/matches.html
|
| diff --git a/LayoutTests/fast/dom/Element/matches.html b/LayoutTests/fast/dom/Element/matches.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..88eb7e74487182d341864d236f7c5949e8291bab
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/Element/matches.html
|
| @@ -0,0 +1,21 @@
|
| +<!doctype html>
|
| +<html>
|
| +<head>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +</head>
|
| +<body class="foo">
|
| +<script>
|
| +var element = document.body;
|
| +["matches", "webkitMatchesSelector"].forEach(function(func)
|
| +{
|
| + shouldThrow("element." + func + "()");
|
| + shouldBeTrue("element." + func + "('body')");
|
| + shouldBeTrue("element." + func + "('html > .foo')");
|
| + shouldBeFalse("element." + func + "('html')");
|
| + shouldBeFalse("element." + func + "('html > .bar')");
|
| + shouldThrow("element." + func + "('')");
|
| + shouldThrow("element." + func + "('!invalid!')");
|
| +});
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|