content/base/test/test_bug631615.html
author Margaret Leibovic <margaret.leibovic@gmail.com>
Mon, 25 Aug 2014 15:28:10 -0700
changeset 216776 8d7b3bfaf3ab9bb3c32afb51d9714246d7c854f4
parent 166710 2e2f6d2947207acc043dbe0539b07e5755f0bee7
child 220738 59e5f46a92dc211599567515f421817261854e6c
permissions -rw-r--r--
Bug 996753 - Telemetry probes for settings pages. r=liuche, a=sledru

<!doctype html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=631615
-->
<head>
  <meta charset="utf-8">
  <title>Test for Bug 631615</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<a target="_blank"
   href="https://bugzilla.mozilla.org/show_bug.cgi?id=631615"
   >Mozilla Bug 631615</a>
<pre id="monitor"></pre>
<script>
function doTest() {
  var monitor = document.getElementById("monitor");
  var html = document.documentElement;
  var results;
  var matches = html.matchesSelector || html.mozMatchesSelector;

  try {
    results = "return: " +
      matches.call(html, "[test!='']:sizzle") + "\n";
  } catch (e) {
    results = "throws: " + e + "\n";
  }

  monitor.appendChild(document.createTextNode(results));
  is(results.slice(0, 6), "throws", "looking for an exception");
}

SimpleTest.runTestExpectingConsoleMessages(doTest, [{
  forbid: true,
  message: /An invalid or illegal string was specified/
}]);
</script>
</body>
</html>