Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / wrapper-map-gc.html
blob416193b3886f9aa59b82e9310755c1cf9900010b
1 <script>
2 function test()
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 var counter = 0;
10 var worker = new Worker("resources/wrapper-map-gc.js");
12 // Post the message from worker back to the worker.
13 // This will fire another onmessage event in the Worker and allocate more data.
14 worker.onmessage = function(evt)
16 worker.postMessage(evt.data);
17 // This appears to be enough to reliably trigger GC in a Worker (about 20Mb strings allocated).
18 if (++counter > 20) {
19 document.getElementById("result").innerText = "PASS";
20 worker.terminate();
21 if (window.testRunner) {
22 testRunner.notifyDone();
27 </script>
28 <body onload=test()>
29 <p>This test tries to cause GC in Worker context. It also fires events in the Worker, which allocates JS DOM Wrappers for Event object. As a result of GC, the maps that map wrappers to DOM Objects will be cleaned up. Test succeeds if it does not crash and prints 'PASS' at the end.</p>
30 <pre id="result"></pre>
31 </body>
32 </html>