content/base/test/test_bug631615.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug631615.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!doctype html>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=631615
     1.8 +-->
     1.9 +<head>
    1.10 +  <meta charset="utf-8">
    1.11 +  <title>Test for Bug 631615</title>
    1.12 +  <script src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank"
    1.17 +   href="https://bugzilla.mozilla.org/show_bug.cgi?id=631615"
    1.18 +   >Mozilla Bug 631615</a>
    1.19 +<pre id="monitor"></pre>
    1.20 +<script>
    1.21 +function doTest() {
    1.22 +  var monitor = document.getElementById("monitor");
    1.23 +  var html = document.documentElement;
    1.24 +  var results;
    1.25 +  var matches = html.matchesSelector || html.mozMatchesSelector;
    1.26 +
    1.27 +  try {
    1.28 +    results = "return: " +
    1.29 +      matches.call(html, "[test!='']:sizzle") + "\n";
    1.30 +  } catch (e) {
    1.31 +    results = "throws: " + e + "\n";
    1.32 +  }
    1.33 +
    1.34 +  monitor.appendChild(document.createTextNode(results));
    1.35 +  is(results.slice(0, 6), "throws", "looking for an exception");
    1.36 +}
    1.37 +
    1.38 +SimpleTest.runTestExpectingConsoleMessages(doTest, [{
    1.39 +  forbid: true,
    1.40 +  message: /An invalid or illegal string was specified/
    1.41 +}]);
    1.42 +</script>
    1.43 +</body>
    1.44 +</html>

mercurial