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

Unified Diff: LayoutTests/fast/layers/layer-visibility-sublayer.html

Issue 1167833002: Make fast/layers/layer-visibility-sublayer.html unflaky (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/layers/layer-visibility-sublayer.html
diff --git a/LayoutTests/fast/layers/layer-visibility-sublayer.html b/LayoutTests/fast/layers/layer-visibility-sublayer.html
index 8fc56618507f2943cef351db228ee3c00761a619..72092176c0d0f75d0a5d0de7bd518a8c5fb47090 100644
--- a/LayoutTests/fast/layers/layer-visibility-sublayer.html
+++ b/LayoutTests/fast/layers/layer-visibility-sublayer.html
@@ -12,33 +12,41 @@
<script>
var node1;
var node2;
-function dotest()
-{
-
-//24
-document.getElementById('24c').style.setProperty('visibility','hidden','');
-document.getElementById('24a').removeChild(document.getElementById('24b'));
-
-//25
-document.getElementById('25c').style.setProperty('visibility','hidden','');
-document.getElementById('25a').removeChild(document.getElementById('25b'));
-//26
-document.getElementById('26c').style.setProperty('visibility','hidden','');
-document.getElementById('26a').removeChild(document.getElementById('26b'));
-setTimeout(dotest2,20);
+function startTest() {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.layoutAndPaintAsyncThen(doTest)
+ } else {
+ requestAnimationFrame(doTest)
+ }
}
-function dotest2()
+function doTest()
{
+ //24
+ document.getElementById('24c').style.setProperty('visibility','hidden','');
+ document.getElementById('24a').removeChild(document.getElementById('24b'));
-//xx
-//document.getElementById('23').style.setProperty('visibility','hidden','');
+ //25
+ document.getElementById('25c').style.setProperty('visibility','hidden','');
+ document.getElementById('25a').removeChild(document.getElementById('25b'));
+
+ //26
+ document.getElementById('26c').style.setProperty('visibility','hidden','');
+ document.getElementById('26a').removeChild(document.getElementById('26b'));
+
+ if (window.testRunner) {
+ testRunner.layoutAndPaintAsyncThen(function() {
+ testRunner.notifyDone();
+ });
+ }
}
+
</script>
</head>
-<body onload="setTimeout(dotest,20)">
+<body onload="startTest();">
<br><br><br><br>
24 green box with word ok:
<div id="24a" class="invisible abstop red">
« 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