WebKit Bugzilla
Attachment 342460 Details for
Bug 185698
: Layout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185698-20180611134641.patch (text/plain), 3.75 KB, created by
Said Abou-Hallawa
on 2018-06-11 13:46:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2018-06-11 13:46:42 PDT
Size:
3.75 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 232729) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,28 @@ >+2018-06-11 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Layout Test svg/dom/animated-tearoff-list-remove-target.html is a flaky timeout >+ https://bugs.webkit.org/show_bug.cgi?id=185698 >+ <rdar://problem/40341200> >+ >+ Reviewed by Daniel Bates. >+ >+ The test is flaky because we get the animVal.getItem(0) of the 'x' attribute >+ from the target element without initializing this attribute with a base value. >+ >+ The test assumes the animator would set the animVal of the 'x' attribute >+ from the 'from' attribute of the <animate> element before animVal.getItem(0) >+ is executed. But this may not always happen. Therefore the test will get >+ the 'IndexSizeError' exception and it will time out. >+ >+ The fix is: >+ -- Initialize the attribute of the target element by a base value. >+ -- Use requestAnimationFrame() instead of using setTimeout() to make the >+ test deterministic. >+ -- Allow the animation to advance one more step after kicking off the GC >+ to ensure the variable 'animItem' is detached from animVal.getItem(0). >+ >+ * svg/dom/animated-tearoff-list-remove-target.html: >+ > 2018-06-11 Chris Dumez <cdumez@apple.com> > > Allow enabling PSON in layout tests without window.open support >Index: LayoutTests/svg/dom/animated-tearoff-list-remove-target.html >=================================================================== >--- LayoutTests/svg/dom/animated-tearoff-list-remove-target.html (revision 232729) >+++ LayoutTests/svg/dom/animated-tearoff-list-remove-target.html (working copy) >@@ -3,10 +3,10 @@ > <div>Removing the target of an animate element should detach the wrappers of the attributes from their animated properties.</div> > <svg> > <text x="15" y="40"> >- <tspan id="first-tspan">First tspan.</tspan> >+ <tspan id="first-tspan" x="0">First tspan.</tspan> > </text> > <text x="15" y="60"> >- <tspan id="second-tspan">Second tspan</tspan> >+ <tspan id="second-tspan" x="0">Second tspan</tspan> > </text> > <animate id="animate" xlink:href="#first-tspan" attributeType="XML" attributeName="x" from="0" to="100" dur="10s" repeatCount="indefinite"/> > </svg> >@@ -26,7 +26,7 @@ > testRunner.waitUntilDone(); > } > >- setTimeout(() => { >+ window.requestAnimationFrame(() => { > // The target of the <animate> element is the "first-tspan". > var tspanElement = document.getElementById("first-tspan"); > >@@ -41,14 +41,16 @@ > // By now animItem should be detached from the animated animList and has its own copy > // of an SVGLength. animItem should not be affected if garbage collection is forced. > gc(); >- if (animItem.valueAsString == "0") { >- document.querySelector("div").innerHTML += "<br><br>PASS." >- document.querySelector("svg").remove(); >- } >- >- if (window.testRunner) >- testRunner.notifyDone(); >- }, 0); >+ window.requestAnimationFrame(() => { >+ if (animItem.valueAsString == "0") { >+ document.querySelector("div").innerHTML += "<br><br>PASS." >+ document.querySelector("svg").remove(); >+ } >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ }); > })(); > </script> > </body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185698
:
342301
|
342331
|
342349
|
342460
|
342468
|
342482