WebKit Bugzilla
Attachment 346653 Details for
Bug 188356
: De-flake some animation tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188356-20180806135503.patch (text/plain), 6.59 KB, created by
Simon Fraser (smfr)
on 2018-08-06 13:55:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-08-06 13:55:04 PDT
Size:
6.59 KB
patch
obsolete
>Subversion Revision: 234515 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 38403286e317bcf13634c844e3fa1181cba48826..bc2b0bd9222d86a9236acef2cf88f0608dfe1b6e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2018-08-06 Simon Fraser <simon.fraser@apple.com> >+ >+ De-flake some animation tests >+ https://bugs.webkit.org/show_bug.cgi?id=188356 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The tests in legacy-animation-engine were flakey because the animation can start before >+ we get a chance to register the event listener. Fix by starting the animation after the >+ load event fires. Make the non-legacy tests match. >+ >+ * compositing/visible-rect/animated-from-none.html: >+ * compositing/visible-rect/animated.html: >+ * legacy-animation-engine/compositing/visible-rect/animated-from-none.html: >+ * legacy-animation-engine/compositing/visible-rect/animated.html: >+ > 2018-08-02 Megan Gardner <megan_gardner@apple.com> > > Reformat editable selection tests to remove potential flakeyness due to autoscroll >diff --git a/LayoutTests/compositing/visible-rect/animated-from-none.html b/LayoutTests/compositing/visible-rect/animated-from-none.html >index fccce7832f05070924f3891d3532b6a6235e9781..464ec0c8f7166e7668d78ce3509cddfb35cdbbce 100644 >--- a/LayoutTests/compositing/visible-rect/animated-from-none.html >+++ b/LayoutTests/compositing/visible-rect/animated-from-none.html >@@ -34,13 +34,16 @@ > > function doTest() > { >- document.getElementById('animated').addEventListener('webkitAnimationStart', function() { >+ let animated = document.getElementById('animated'); >+ animated.addEventListener('webkitAnimationStart', function() { > if (window.internals) > document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) > > if (window.testRunner) > testRunner.notifyDone(); > }, false); >+ >+ animated.classList.add('animating'); > } > window.addEventListener('load', doTest, false); > </script> >diff --git a/LayoutTests/compositing/visible-rect/animated.html b/LayoutTests/compositing/visible-rect/animated.html >index 12a77bb16e762d4ea3da4afb8beac3b2b8dc8109..7160dac50f9c079f17a9893aa4f4680173356540 100644 >--- a/LayoutTests/compositing/visible-rect/animated.html >+++ b/LayoutTests/compositing/visible-rect/animated.html >@@ -17,6 +17,9 @@ > width: 200px; > height: 200px; > background-color: blue; >+ } >+ >+ .box.animating { > -webkit-animation: move 20000000s linear; > } > >@@ -33,15 +36,16 @@ > > function doTest() > { >- document.getElementById('animated').addEventListener('webkitAnimationStart', function() { >- requestAnimationFrame(() => { >- if (window.internals) >- document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) >+ let animated = document.getElementById('animated'); >+ animated.addEventListener('webkitAnimationStart', function() { >+ if (window.internals) >+ document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) > >- if (window.testRunner) >- testRunner.notifyDone(); >- }); >+ if (window.testRunner) >+ testRunner.notifyDone(); > }, false); >+ >+ animated.classList.add('animating'); > } > window.addEventListener('load', doTest, false); > </script> >diff --git a/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated-from-none.html b/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated-from-none.html >index fccce7832f05070924f3891d3532b6a6235e9781..aa96ef379ced6069371f18f83605e786c674f57c 100644 >--- a/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated-from-none.html >+++ b/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated-from-none.html >@@ -18,6 +18,9 @@ > width: 200px; > height: 200px; > background-color: blue; >+ } >+ >+ .box.animating { > -webkit-animation: move 20000000s linear; > } > >@@ -34,13 +37,16 @@ > > function doTest() > { >- document.getElementById('animated').addEventListener('webkitAnimationStart', function() { >+ let animated = document.getElementById('animated'); >+ animated.addEventListener('webkitAnimationStart', function() { > if (window.internals) > document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) > > if (window.testRunner) > testRunner.notifyDone(); > }, false); >+ >+ animated.classList.add('animating'); > } > window.addEventListener('load', doTest, false); > </script> >diff --git a/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated.html b/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated.html >index bfbe32b670c7936c8650ed48417bd2ab1fa60e65..5c98842dc5b3dd44f884b99463df197501eff843 100644 >--- a/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated.html >+++ b/LayoutTests/legacy-animation-engine/compositing/visible-rect/animated.html >@@ -17,6 +17,9 @@ > width: 200px; > height: 200px; > background-color: blue; >+ } >+ >+ .box.animating { > -webkit-animation: move 20000000s linear; > } > >@@ -33,13 +36,16 @@ > > function doTest() > { >- document.getElementById('animated').addEventListener('webkitAnimationStart', function() { >+ let animated = document.getElementById('animated'); >+ animated.addEventListener('webkitAnimationStart', function() { > if (window.internals) > document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) > > if (window.testRunner) > testRunner.notifyDone(); > }, false); >+ >+ animated.classList.add('animating'); > } > window.addEventListener('load', doTest, false); > </script>
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 188356
: 346653