<html>
<head>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    log = function(msg)
    {
        document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
    }

    shouldThrow = function(_a)
    {
        try {
            eval(_a);
            log("FAIL: " + _a + " did not throw");
        } catch(ex) {
            log("PASS: " + _a + " throws: " + ex);
        }
    }

    shouldNotThrow = function(_a)
    {
        try {
            eval(_a);
            log("PASS: " + _a + " did not throw");
        } catch(ex) {
            log("FAIL: " + _a + " throws: " + ex);
        }
    }

    onload = function()
    {
        shouldThrow("document.querySelector('bbb|pre')");
        shouldThrow("document.querySelectorAll('bbb|pre')");
        shouldThrow("document.body.matches('bbb|pre')");
        shouldThrow("document.body.webkitMatchesSelector('bbb|pre')");
        shouldNotThrow("document.querySelector('*|pre')");
        shouldNotThrow("document.querySelectorAll('*|pre')");
        shouldNotThrow("document.body.matches('*|pre')");
        shouldNotThrow("document.body.webkitMatchesSelector('*|pre')");
        shouldNotThrow("document.querySelector('|pre')");
        shouldNotThrow("document.querySelectorAll('|pre')");
        shouldNotThrow("document.body.matches('|pre')");
        shouldNotThrow("document.body.webkitMatchesSelector('|pre')");

        shouldThrow("document.querySelector('div bbb|pre')");
        shouldThrow("document.querySelectorAll('div bbb|pre')");
        shouldThrow("document.body.matches('div bbb|pre')");
        shouldThrow("document.body.webkitMatchesSelector('div bbb|pre')");
        shouldNotThrow("document.querySelector('div *|pre')");
        shouldNotThrow("document.querySelectorAll('div *|pre')");
        shouldNotThrow("document.body.matches('div *|pre')");
        shouldNotThrow("document.body.webkitMatchesSelector('div *|pre')");
        shouldNotThrow("document.querySelector('div |pre')");
        shouldNotThrow("document.querySelectorAll('div |pre')");
        shouldNotThrow("document.body.matches('div |pre')");
        shouldNotThrow("document.body.webkitMatchesSelector('div |pre')");

        shouldThrow("document.querySelector('[bbb|name=value]')");
        shouldThrow("document.querySelectorAll('[bbb|name=value]')");
        shouldThrow("document.body.matches('[bbb|name=value]')");
        shouldThrow("document.body.webkitMatchesSelector('[bbb|name=value]')");
        shouldNotThrow("document.querySelector('[*|name=value]')");
        shouldNotThrow("document.querySelectorAll('[*|name=value]')");
        shouldNotThrow("document.body.matches('[*|name=value]')");
        shouldNotThrow("document.body.webkitMatchesSelector('[*|name=value]')");
        shouldNotThrow("document.querySelector('[|name=value]')");
        shouldNotThrow("document.querySelectorAll('[|name=value]')");
        shouldNotThrow("document.body.matches('[|name=value]')");
        shouldNotThrow("document.body.webkitMatchesSelector('[|name=value]')");

        shouldNotThrow("document.querySelector(':-webkit-any(bbb|pre)')");

        shouldThrow("document.querySelector('div [bbb|name=value]')");
        shouldThrow("document.querySelectorAll('div [bbb|name=value]')");
        shouldThrow("document.body.matches('div [bbb|name=value]')");
        shouldThrow("document.body.webkitMatchesSelector('div [bbb|name=value]')");
        shouldNotThrow("document.querySelector('div [*|name=value]')");
        shouldNotThrow("document.querySelectorAll('div [*|name=value]')");
        shouldNotThrow("document.body.matches('div [*|name=value]')");
        shouldNotThrow("document.body.webkitMatchesSelector('div [*|name=value]')");
        shouldNotThrow("document.querySelector('div [|name=value]')");
        shouldNotThrow("document.querySelectorAll('div [|name=value]')");
        shouldNotThrow("document.body.matches('div [|name=value]')");
        shouldNotThrow("document.body.webkitMatchesSelector('div [|name=value]')");
    }
</script>
</head>
<body>
    <p>This tests that we throw a NAMESPACE_ERR when parsing a selector string for querySelector and querySelectorAll
        that contains a namespace.</p>
    <pre id="console" name="value"></pre>
</body>
</html>
