2012-11-16 18:53:32 -08:00
|
|
|
<!doctype html>
|
2011-02-04 14:17:00 -08:00
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=631615
|
|
|
|
-->
|
|
|
|
<head>
|
2012-03-24 04:34:42 -07:00
|
|
|
<meta charset="utf-8">
|
2011-02-04 14:17:00 -08:00
|
|
|
<title>Test for Bug 631615</title>
|
2012-11-16 18:53:32 -08:00
|
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
2011-02-04 14:17:00 -08:00
|
|
|
</head>
|
|
|
|
<body>
|
2012-11-16 18:53:32 -08:00
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=631615"
|
|
|
|
>Mozilla Bug 631615</a>
|
|
|
|
<pre id="monitor"></pre>
|
|
|
|
<script>
|
2011-02-04 14:17:00 -08:00
|
|
|
function doTest() {
|
2012-11-16 18:53:32 -08:00
|
|
|
var monitor = document.getElementById("monitor");
|
2011-02-04 14:17:00 -08:00
|
|
|
var html = document.documentElement;
|
|
|
|
var results;
|
|
|
|
|
|
|
|
try {
|
2014-08-12 05:30:59 -07:00
|
|
|
results = "return: " + html.matches("[test!='']:sizzle") + "\n";
|
2011-02-04 14:17:00 -08:00
|
|
|
} catch (e) {
|
|
|
|
results = "throws: " + e + "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
monitor.appendChild(document.createTextNode(results));
|
|
|
|
is(results.slice(0, 6), "throws", "looking for an exception");
|
|
|
|
}
|
|
|
|
|
2013-12-06 18:07:09 -08:00
|
|
|
SimpleTest.runTestExpectingConsoleMessages(doTest, [{
|
|
|
|
forbid: true,
|
|
|
|
message: /An invalid or illegal string was specified/
|
|
|
|
}]);
|
2011-02-04 14:17:00 -08:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|