Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xmlhttprequest / xmlhttprequest-gc.html
blob966315973cbbb3df9cb66a8891bd4f8eebcaad3a
1 <html>
2 <script>
3 function stateChange() {
4 document.write(this.foo + '<br>');
5 if (this.readyState == 4) {
6 if (window.testRunner)
7 testRunner.notifyDone();
11 function collectGarbage() {
12 if (window.GCController) {
13 window.GCController.collect();
14 } else {
15 for (var i = 0; i < 50000; i++)
16 new Object();
20 function runTest() {
21 document.write("Tests that garbage collection doesn't drop the XMLHttpRequest JS wrapper until the send command is done. You should see 'bar' four times below.<br>");
23 if (window.testRunner) {
24 testRunner.dumpAsText();
25 testRunner.waitUntilDone();
28 var xhr = new XMLHttpRequest();
29 xhr.foo = 'bar';
30 xhr.onreadystatechange = stateChange;
31 xhr.open("GET", "xmlhttprequest-gc.html", true);
32 xhr.send(null);
34 xhr = null;
35 collectGarbage();
38 </script>
39 <body onload='runTest()'>
40 </body>
41 </html>