5 testRunner
.dumpAsText();
9 document
.getElementById('console').appendChild(document
.createTextNode(msg
+ "\n"));
12 shouldThrow = function(_a
)
16 log("FAIL: " + _a
+ " did not throw");
18 log("PASS: " + _a
+ " throws: " + ex
);
22 shouldNotThrow = function(_a
)
26 log("PASS: " + _a
+ " did not throw");
28 log("FAIL: " + _a
+ " throws: " + ex
);
34 shouldThrow("document.querySelector('bbb|pre')");
35 shouldThrow("document.querySelectorAll('bbb|pre')");
36 shouldThrow("document.body.webkitMatchesSelector('bbb|pre')");
37 shouldNotThrow("document.querySelector('*|pre')");
38 shouldNotThrow("document.querySelectorAll('*|pre')");
39 shouldNotThrow("document.body.webkitMatchesSelector('*|pre')");
40 shouldNotThrow("document.querySelector('|pre')");
41 shouldNotThrow("document.querySelectorAll('|pre')");
42 shouldNotThrow("document.body.webkitMatchesSelector('|pre')");
44 shouldThrow("document.querySelector('div bbb|pre')");
45 shouldThrow("document.querySelectorAll('div bbb|pre')");
46 shouldThrow("document.body.webkitMatchesSelector('div bbb|pre')");
47 shouldNotThrow("document.querySelector('div *|pre')");
48 shouldNotThrow("document.querySelectorAll('div *|pre')");
49 shouldNotThrow("document.body.webkitMatchesSelector('div *|pre')");
50 shouldNotThrow("document.querySelector('div |pre')");
51 shouldNotThrow("document.querySelectorAll('div |pre')");
52 shouldNotThrow("document.body.webkitMatchesSelector('div |pre')");
54 shouldThrow("document.querySelector('[bbb|name=value]')");
55 shouldThrow("document.querySelectorAll('[bbb|name=value]')");
56 shouldThrow("document.body.webkitMatchesSelector('[bbb|name=value]')");
57 shouldNotThrow("document.querySelector('[*|name=value]')");
58 shouldNotThrow("document.querySelectorAll('[*|name=value]')");
59 shouldNotThrow("document.body.webkitMatchesSelector('[*|name=value]')");
60 shouldNotThrow("document.querySelector('[|name=value]')");
61 shouldNotThrow("document.querySelectorAll('[|name=value]')");
62 shouldNotThrow("document.body.webkitMatchesSelector('[|name=value]')");
64 shouldThrow("document.querySelector(':-webkit-any(bbb|pre)')");
66 shouldThrow("document.querySelector('div [bbb|name=value]')");
67 shouldThrow("document.querySelectorAll('div [bbb|name=value]')");
68 shouldThrow("document.body.webkitMatchesSelector('div [bbb|name=value]')");
69 shouldNotThrow("document.querySelector('div [*|name=value]')");
70 shouldNotThrow("document.querySelectorAll('div [*|name=value]')");
71 shouldNotThrow("document.body.webkitMatchesSelector('div [*|name=value]')");
72 shouldNotThrow("document.querySelector('div [|name=value]')");
73 shouldNotThrow("document.querySelectorAll('div [|name=value]')");
74 shouldNotThrow("document.body.webkitMatchesSelector('div [|name=value]')");
79 <p>This tests that we throw a NAMESPACE_ERR when parsing a selector string for querySelector and querySelectorAll
80 that contains a namespace.
</p>
81 <pre id=
"console" name=
"value"></pre>