testing/mochitest/tests/Harness_sanity/test_sanityException2.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testing/mochitest/tests/Harness_sanity/test_sanityException2.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Test that uncaught exceptions in mochitests cause failures</title>
     1.8 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +</head>
    1.10 +<body>
    1.11 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=670817">Mozilla Bug 670817</a>
    1.12 +<script>
    1.13 +SimpleTest.waitForExplicitFinish();
    1.14 +ok(true, "a call to ok");
    1.15 +SimpleTest.executeSoon(function() {
    1.16 +  SimpleTest.expectUncaughtException();
    1.17 +  throw "an uncaught exception";
    1.18 +});
    1.19 +SimpleTest.executeSoon(function() {
    1.20 +  SimpleTest.finish();
    1.21 +});
    1.22 +</script>
    1.23 +</body>
    1.24 +</html>

mercurial