Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / websocket / workers / worker-reload-repeated.html
1 <!DOCTYPE html>
2 <div id="result"></div>
3 <script>
4 if (window.testRunner) {
5     testRunner.dumpAsText();
6     testRunner.waitUntilDone();
7 }
8
9 var repeat = 0;
10 var regex = new RegExp("#repeat(\\d+)");
11 var match = regex.exec(location.hash);
12 if (match)
13     repeat = parseInt(match[1]);
14
15 if (repeat === 100) {
16     document.getElementById("result").innerHTML = "Done.";
17     if (window.testRunner)
18         testRunner.notifyDone();
19 } else {
20     new Worker("resources/worker-reload.js");
21     location.href = "worker-reload-repeated.html#repeat" + (repeat + 1);
22     setTimeout('location.reload()', 1);
23 }
24 </script>