summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/devtools/js_page.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/devtools/js_page.html')
-rw-r--r--chrome/test/data/devtools/js_page.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/test/data/devtools/js_page.html b/chrome/test/data/devtools/js_page.html
index 86267ef..1fde9fe 100644
--- a/chrome/test/data/devtools/js_page.html
+++ b/chrome/test/data/devtools/js_page.html
@@ -6,10 +6,23 @@
}
function eternal_fib() {
- window.setTimeout("fib(20); eternal_fib();", 0);
+ var started = Date.now();
+ while(true) {
+ fib(20);
+ // Make page responsive by making a break every 100 ms.
+ if (Date.now() - started >= 100) {
+ setTimeout(eternal_fib, 0);
+ return;
+ }
+ }
+ }
+
+ function load() {
+ // Let the page do initial rendering, then go.
+ setTimeout(eternal_fib, 200);
}
</script>
</head>
- <body onload="eternal_fib()">
+ <body onload="load()">
</body>
</html>