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

Unified Diff: LayoutTests/fast/events/resize-events.html

Issue 15023009: Make the resize-events test not flaky. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@flaky
Patch Set: patch to land: rebase to 1 sec ago upstream Created 7 years, 7 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/resize-events.html
diff --git a/LayoutTests/fast/events/resize-events.html b/LayoutTests/fast/events/resize-events.html
index 3e005a9846950949fcebe1a42acdb5ecc229d820..a4dd5d54106443bcb91c266d2e0294b1ddc24e39 100644
--- a/LayoutTests/fast/events/resize-events.html
+++ b/LayoutTests/fast/events/resize-events.html
@@ -27,16 +27,16 @@
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
-
- var blockcount = 0;
+ function test() {
+ setTimeout(addBlock, 20);
+ }
function addBlock() {
- var el = document.createElement('div');
- el.setAttribute('class','block');
- document.getElementById('expandingblock').appendChild(el);
- if (++blockcount < 10)
- setTimeout(addBlock, 20);
- else
- finish();
+ for (var i = 0; i < 10; i++) {
+ var el = document.createElement('div');
+ el.setAttribute('class','block');
+ document.getElementById('expandingblock').appendChild(el);
+ }
+ setTimeout(finish, 20);
}
function finish() {
var result;
@@ -50,6 +50,6 @@
if (window.testRunner)
testRunner.notifyDone();
}
- onload = addBlock;
+ onload = test;
</script>
</body>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698