1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/workers/test/test_newError.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<html> 1.9 +<head> 1.10 + <title>Test for DOM Worker Threads</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 +</head> 1.14 +<body> 1.15 +<pre id="test"> 1.16 +<script class="testbody" type="text/javascript"> 1.17 + 1.18 + var worker = new Worker("newError_worker.js"); 1.19 + 1.20 + worker.onmessage = function(event) { 1.21 + ok(false, "Shouldn't get a message!"); 1.22 + SimpleTest.finish(); 1.23 + } 1.24 + 1.25 + worker.onerror = function(event) { 1.26 + is(event.message, "Error: foo!", "Got wrong error message!"); 1.27 + event.preventDefault(); 1.28 + SimpleTest.finish(); 1.29 + } 1.30 + 1.31 + SimpleTest.waitForExplicitFinish(); 1.32 + 1.33 +</script> 1.34 +</pre> 1.35 +</body> 1.36 +</html> 1.37 +