test_TestsRunningAfterSimpleTestFinish.html (685B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Test for whether SimpLeTest.ok after SimpleTest.finish is causing an error to be logged</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 7 </head> 8 <body> 9 10 <div id="content" class="testbody"> 11 <script type="text/javascript"> 12 SimpleTest.waitForExplicitFinish(); 13 addLoadEvent(function() { 14 ok(true, "This should pass"); 15 SimpleTest.finish(); 16 }); 17 window.onbeforeunload = function() { 18 ok(true, "This should cause failures in the harness, because it's run after SimpleTest.finish()"); 19 } 20 </script> 21 </div> 22 </body> 23 </html>