Title: [214316] trunk/LayoutTests
- Revision
- 214316
- Author
- [email protected]
- Date
- 2017-03-23 13:57:06 -0700 (Thu, 23 Mar 2017)
Log Message
Add a test to make sure SVG animations are paused in detached iframes
https://bugs.webkit.org/show_bug.cgi?id=170020
Reviewed by Antti Koivisto.
* svg/animations/animations-paused-disconnected-iframe-expected.txt: Added.
* svg/animations/animations-paused-disconnected-iframe.html: Added.
* svg/animations/resources/frame-with-svg-animation.html: Added.
* svg/animations/resources/grandchild-frame-with-svg-animation.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (214315 => 214316)
--- trunk/LayoutTests/ChangeLog 2017-03-23 20:56:36 UTC (rev 214315)
+++ trunk/LayoutTests/ChangeLog 2017-03-23 20:57:06 UTC (rev 214316)
@@ -1,3 +1,15 @@
+2017-03-23 Chris Dumez <[email protected]>
+
+ Add a test to make sure SVG animations are paused in detached iframes
+ https://bugs.webkit.org/show_bug.cgi?id=170020
+
+ Reviewed by Antti Koivisto.
+
+ * svg/animations/animations-paused-disconnected-iframe-expected.txt: Added.
+ * svg/animations/animations-paused-disconnected-iframe.html: Added.
+ * svg/animations/resources/frame-with-svg-animation.html: Added.
+ * svg/animations/resources/grandchild-frame-with-svg-animation.html: Added.
+
2017-03-23 Daniel Bates <[email protected]>
REGRESSION (r214047): LayoutTest fast/events/pageshow-pagehide-on-back-cached-with-frames.html is a flaky failure
Added: trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe-expected.txt (0 => 214316)
--- trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe-expected.txt 2017-03-23 20:57:06 UTC (rev 214316)
@@ -0,0 +1,17 @@
+Tests that SVG animations are properly paused in disconnected iframes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS frameWindow.internals.areSVGAnimationsPaused is false
+PASS grandChildWindow.internals.areSVGAnimationsPaused is false
+Removing iframe from the document.
+PASS frameWindow.internals.areSVGAnimationsPaused is true
+PASS grandChildWindow.internals.areSVGAnimationsPaused is true
+Add iframe back into the document.
+PASS frame.contentWindow.internals.areSVGAnimationsPaused is false
+PASS frame.contentDocument.getElementById('grandChildFrame').contentWindow.internals.areSVGAnimationsPaused is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe.html (0 => 214316)
--- trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe.html (rev 0)
+++ trunk/LayoutTests/svg/animations/animations-paused-disconnected-iframe.html 2017-03-23 20:57:06 UTC (rev 214316)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Tests that SVG animations are properly paused in disconnected iframes.");
+jsTestIsAsync = true;
+
+window._onload_ = function() {
+ frame = document.getElementById("testFrame");
+ grandChildFrame = frame.contentDocument.getElementById("grandChildFrame");
+ frameWindow = frame.contentWindow;
+ grandChildWindow = grandChildFrame.contentWindow;
+
+ shouldBeFalse("frameWindow.internals.areSVGAnimationsPaused");
+ shouldBeFalse("grandChildWindow.internals.areSVGAnimationsPaused");
+
+ debug("Removing iframe from the document.");
+ frame.remove();
+
+ shouldBeTrue("frameWindow.internals.areSVGAnimationsPaused");
+ shouldBeTrue("grandChildWindow.internals.areSVGAnimationsPaused");
+
+ debug("Add iframe back into the document.");
+ frame._onload_ = function() {
+ shouldBeFalse("frame.contentWindow.internals.areSVGAnimationsPaused");
+ shouldBeFalse("frame.contentDocument.getElementById('grandChildFrame').contentWindow.internals.areSVGAnimationsPaused");
+ finishJSTest();
+ }
+ document.body.appendChild(frame);
+}
+</script>
+<iframe id="testFrame" src=""
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/svg/animations/resources/frame-with-svg-animation.html (0 => 214316)
--- trunk/LayoutTests/svg/animations/resources/frame-with-svg-animation.html (rev 0)
+++ trunk/LayoutTests/svg/animations/resources/frame-with-svg-animation.html 2017-03-23 20:57:06 UTC (rev 214316)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+<svg width="300px" height="100px">
+ <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" />
+ <circle cx="0" cy="50" r="15" fill="blue" stroke="black" stroke-width="1">
+ <animate attributeName="cx" from="0" to="100" dur="5s" repeatCount="indefinite" />
+ </circle>
+</svg>
+<iframe id="grandChildFrame" src=""
+</body>
+</html>
Added: trunk/LayoutTests/svg/animations/resources/grandchild-frame-with-svg-animation.html (0 => 214316)
--- trunk/LayoutTests/svg/animations/resources/grandchild-frame-with-svg-animation.html (rev 0)
+++ trunk/LayoutTests/svg/animations/resources/grandchild-frame-with-svg-animation.html 2017-03-23 20:57:06 UTC (rev 214316)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<svg width="300px" height="100px">
+ <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" />
+ <circle cx="0" cy="50" r="15" fill="blue" stroke="black" stroke-width="1">
+ <animate attributeName="cx" from="0" to="100" dur="5s" repeatCount="indefinite" />
+ </circle>
+</svg>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes