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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink=" http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()"> 1 <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink=" http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()">
2 <script xlink:href="../../resources/run-after-layout-and-paint.js"/>
2 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/> 3 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/>
3 <script> 4 <script>
4 <![CDATA[ 5 <![CDATA[
5 window.testIsAsync = true; 6 window.testIsAsync = true;
6 function repaintTest() { 7 function repaintTest() {
7 container = document.getElementById("inneruse"); 8 container = document.getElementById("inneruse");
8 stop = document.getElementById("offset"); 9 stop = document.getElementById("offset");
9 // FIXME: we need a better way of waiting for layout/repainting to happen 10 runAfterLayoutAndPaint(offset);
10 setTimeout(offset, 1);
11 } 11 }
12 var turns = 5; 12 var turns = 5;
13 function offset(){ 13 function offset(){
14 container.setAttribute ("transform", ""); 14 container.setAttribute ("transform", "");
15 stop.setAttribute ("offset", "1.0"); 15 stop.setAttribute ("offset", "1.0");
16 turns--; 16 turns--;
17 if (turns > 0) { 17 if (turns > 0)
18 // FIXME: we need a better way of waiting for layout/repainting to happe n 18 runAfterLayoutAndPaint(offset);
19 window.setTimeout("offset()", 1) 19 else
20 } else
21 finishRepaintTest(); 20 finishRepaintTest();
22 } 21 }
23 ]]> 22 ]]>
24 </script> 23 </script>
25 <defs> 24 <defs>
26 <linearGradient id="grad"> 25 <linearGradient id="grad">
27 <stop offset="0" style="stop-color: green"/> 26 <stop offset="0" style="stop-color: green"/>
28 <stop id="offset" offset="1" style="stop-color: green"/> 27 <stop id="offset" offset="1" style="stop-color: green"/>
29 </linearGradient> 28 </linearGradient>
30 <path id="hp" d="M 0 0 L 100 0 L 100 100 L 0 100" /> 29 <path id="hp" d="M 0 0 L 100 0 L 100 100 L 0 100" />
31 </defs> 30 </defs>
32 <g id="inneruse"> 31 <g id="inneruse">
33 <use xlink:href="#hp" style="fill:url(#grad)"/> 32 <use xlink:href="#hp" style="fill:url(#grad)"/>
34 </g> 33 </g>
35 <use xlink:href="#inneruse" style="fill:url(#grad)"/> 34 <use xlink:href="#inneruse" style="fill:url(#grad)"/>
36 </svg> 35 </svg>
OLDNEW
« 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