test_warning_reporter.html (736B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE HTML> 6 <html> 7 <!-- 8 Test warning reporter's behavior when both an error and a warning are reported. 9 --> 10 <head> 11 <title>Test warnings and errors in Workers</title> 12 <script src="/tests/SimpleTest/SimpleTest.js"></script> 13 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 14 </head> 15 <body> 16 <script> 17 SimpleTest.waitForExplicitFinish(); 18 19 const worker = new Worker("warning_reporter_worker.js"); 20 worker.onmessage = function(e) { 21 if (e.data.type == "finish") { 22 ok(e.data.caught, "An error should be caught"); 23 SimpleTest.finish(); 24 } 25 } 26 </script> 27 </pre> 28 </body> 29 </html>