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

Unified Diff: LayoutTests/svg/custom/resource-client-removal.svg

Issue 1286093008: Replace setTimeout() with runAfterLayoutAndPaint() in a few tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/svg/custom/js-late-pattern-and-object-creation.svg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/custom/resource-client-removal.svg
diff --git a/LayoutTests/svg/custom/resource-client-removal.svg b/LayoutTests/svg/custom/resource-client-removal.svg
index 3fd84f48949257aa8f549900a36f132e37ea9078..339fa42d85ede748df96e305ee21e55f2ad8cebb 100644
--- a/LayoutTests/svg/custom/resource-client-removal.svg
+++ b/LayoutTests/svg/custom/resource-client-removal.svg
@@ -1,4 +1,5 @@
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()">
+<script xlink:href="../../resources/run-after-layout-and-paint.js"/>
<script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/>
<script>
<![CDATA[
@@ -6,18 +7,16 @@ window.testIsAsync = true;
function repaintTest() {
container = document.getElementById("inneruse");
stop = document.getElementById("offset");
- // FIXME: we need a better way of waiting for layout/repainting to happen
- setTimeout(offset, 1);
+ runAfterLayoutAndPaint(offset);
}
var turns = 5;
function offset(){
container.setAttribute ("transform", "");
stop.setAttribute ("offset", "1.0");
turns--;
- if (turns > 0) {
- // FIXME: we need a better way of waiting for layout/repainting to happen
- window.setTimeout("offset()", 1)
- } else
+ if (turns > 0)
+ runAfterLayoutAndPaint(offset);
+ else
finishRepaintTest();
}
]]>
« no previous file with comments | « LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698