Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / shared-worker-load-error.html
blobc69266a4e3f15160aa715bc2ce0c020b4e5118f5
1 <body>
2 <p>Test SharedWorker onerror functionality. Prints multiple SUCCESS lines, then DONE when complete.</p>
3 <div id=result></div>
4 <script>
5 function log(message)
7 document.getElementById("result").innerHTML += message + "<br>";
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
15 function testSimpleLoadError()
17 var worker = new SharedWorker("file_does_not_exist.js", "name");
18 worker.onerror = function(evt) {
19 log("PASS: Received load error event: " + evt);
20 testLoadErrorGC();
24 function testLoadErrorGC()
26 var worker = new SharedWorker("file_does_not_exist.js", "name");
27 worker.onerror = handleError;
28 worker = null;
29 gc();
32 function gc()
34 if (window.GCController)
35 return GCController.collect();
37 for (var i = 0; i < 10000; i++) { // force garbage collection (FF requires about 9K allocations before a collect)
38 var s = new String("abc");
43 function handleError(evt) {
44 log("PASS: Received error event after worker GC'd: " + evt);
45 log("DONE");
46 if (window.testRunner)
47 testRunner.notifyDone();
50 testSimpleLoadError();
51 </script>
52 </body>