Changeset 232736 in webkit
- Timestamp:
- Jun 11, 2018 5:11:02 PM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r232735 r232736 1 2018-06-11 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Layout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=185698 5 <rdar://problem/40341200> 6 7 Reviewed by Daniel Bates. 8 9 The test is flaky because we get the animVal.getItem(0) of the 'x' attribute 10 from the target element without initializing this attribute with a base value. 11 12 The test assumes the animator would set the animVal of the 'x' attribute 13 from the 'from' attribute of the <animate> element before animVal.getItem(0) 14 is executed. But this may not always happen. Therefore the test will get 15 the 'IndexSizeError' exception and it will time out. 16 17 The fix is: 18 -- Initialize the attribute of the target element by a base value. 19 -- Use requestAnimationFrame() instead of using setTimeout() to make the 20 test deterministic. 21 -- Allow the animation to advance one more step after kicking off the GC 22 to ensure the variable 'animItem' is detached from animVal.getItem(0). 23 24 * svg/dom/animated-tearoff-list-remove-target.html: 25 1 26 2018-06-11 Jer Noble <jer.noble@apple.com> 2 27 -
trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target.html
r230172 r232736 4 4 <svg> 5 5 <text x="15" y="40"> 6 <tspan id="first-tspan" >First tspan.</tspan>6 <tspan id="first-tspan" x="0">First tspan.</tspan> 7 7 </text> 8 8 <text x="15" y="60"> 9 <tspan id="second-tspan" >Second tspan</tspan>9 <tspan id="second-tspan" x="0">Second tspan</tspan> 10 10 </text> 11 11 <animate id="animate" xlink:href="#first-tspan" attributeType="XML" attributeName="x" from="0" to="100" dur="10s" repeatCount="indefinite"/> … … 27 27 } 28 28 29 setTimeout(() => {29 window.requestAnimationFrame(() => { 30 30 // The target of the <animate> element is the "first-tspan". 31 31 var tspanElement = document.getElementById("first-tspan"); … … 42 42 // of an SVGLength. animItem should not be affected if garbage collection is forced. 43 43 gc(); 44 if (animItem.valueAsString == "0") { 45 document.querySelector("div").innerHTML += "<br><br>PASS." 46 document.querySelector("svg").remove(); 47 } 44 window.requestAnimationFrame(() => { 45 if (animItem.valueAsString == "0") { 46 document.querySelector("div").innerHTML += "<br><br>PASS." 47 document.querySelector("svg").remove(); 48 } 48 49 49 if (window.testRunner) 50 testRunner.notifyDone(); 51 }, 0); 50 if (window.testRunner) 51 testRunner.notifyDone(); 52 }); 53 }); 52 54 })(); 53 55 </script>
Note: See TracChangeset
for help on using the changeset viewer.