Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / xmlhttprequest-sync-no-timers.html
bloba086fdf1a55d95e0b9ff9b83161f04fac0cfd253
1 <html><body>
3 <p> Test for: <a href="https://bugs.webkit.org/show_bug.cgi?id=68238">bug 68238<a>: [soup] Crash while loading http://www.jusco.cn</a> This test verifies that WebCore timers do not fire during synchronous XMLHttpRequests.
4 <pre id=log></pre>
6 <script type="text/javascript">
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 function log(message)
12 document.getElementById("log").innerHTML += message + "\n";
15 var timerEverFired = false;
16 var intervalId = setInterval(function() {
17 timerEverFired = true;
18 }, 10);
20 try {
21 var req = new XMLHttpRequest();
22 req.open("GET", "resources/download-with-delay.php?iteration=5&delay=50", false);
23 req.send(null);
24 } catch (ex) {
25 log(ex);
28 clearInterval(intervalId);
29 log(timerEverFired ? "FAIL" : "PASS");
30 </script>
32 </body></html>