Bug 809674 - Tests. r=me

This commit is contained in:
Bobby Holley 2013-03-11 14:45:21 -07:00
parent 237fcbb44b
commit a2e37fc5a7
2 changed files with 36 additions and 0 deletions

View File

@ -89,6 +89,7 @@ MOCHITEST_FILES = chrome_wrappers_helper.html \
file_bug802557.html \ file_bug802557.html \
test_bug803730.html \ test_bug803730.html \
test_bug809547.html \ test_bug809547.html \
test_bug809674.html \
file_crosscompartment_weakmap.html \ file_crosscompartment_weakmap.html \
test_crosscompartment_weakmap.html \ test_crosscompartment_weakmap.html \
$(NULL) $(NULL)

View File

@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=809674
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 809674</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=809674">Mozilla Bug 809674</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 809674 **/
var mse = document.createEvent('TimeEvents');
mse.initTimeEvent('', {}, '');
try {
mse.view.onunload;
ok(false, "Should have thrown");
} catch(e) {
ok(!!/implicit_jscontext/.exec(e), "Should throw a helpful error");
}
</script>
</pre>
</body>
</html>