Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5308)

Unified Diff: chrome/test/data/devtools/js_page.html

Issue 200040: DevTools: fix flakiness of DevToolsSanityTest/TestProfilerTab. (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/devtools/js_page.html
diff --git a/chrome/test/data/devtools/js_page.html b/chrome/test/data/devtools/js_page.html
index 86267ef7443182fb358e0bfbee131861f0c75995..f4d8acc1a284c064415d341b72a77f8767bb937e 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 = (new Date()).getTime();
yurys 2009/09/08 09:46:28 Use Date.now(); instead
mnaganov (inactive) 2009/09/08 09:49:23 Thanks! Done.
+ while(true) {
+ fib(20);
+ // Make page responsive by making a break every 100 ms.
+ if ((new Date()).getTime() - started >= 100) {
yurys 2009/09/08 09:46:28 ditto
mnaganov (inactive) 2009/09/08 09:49:23 Done.
+ 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>
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698