Title: [107213] trunk/LayoutTests
Revision
107213
Author
[email protected]
Date
2012-02-09 03:44:55 -0800 (Thu, 09 Feb 2012)

Log Message

[Qt] REGRESSION(r106918): It made svg/as-object/nested-embedded-svg-size-changes.html fail in debug mode
https://bugs.webkit.org/show_bug.cgi?id=78026

[Chromium] Layout Test svg/as-object/nested-embedded-svg-size-changes.html times out
https://bugs.webkit.org/show_bug.cgi?id=77183

Reviewed by Andreas Kling.

Rework testcases, to wait for the embedded SVG of the embedded HTML that we're loading.
Should fix the flakiness for both Qt/Chromium.

* platform/qt/Skipped: Unskip test.
* svg/as-object/nested-embedded-svg-size-changes.html: Wait for the embedded SVG to load, before trying to access it.
* svg/as-object/resources/nested-embedded-svg-size-changes-target.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107212 => 107213)


--- trunk/LayoutTests/ChangeLog	2012-02-09 11:44:28 UTC (rev 107212)
+++ trunk/LayoutTests/ChangeLog	2012-02-09 11:44:55 UTC (rev 107213)
@@ -1,3 +1,20 @@
+2012-02-09  Nikolas Zimmermann  <[email protected]>
+
+        [Qt] REGRESSION(r106918): It made svg/as-object/nested-embedded-svg-size-changes.html fail in debug mode
+        https://bugs.webkit.org/show_bug.cgi?id=78026
+
+        [Chromium] Layout Test svg/as-object/nested-embedded-svg-size-changes.html times out
+        https://bugs.webkit.org/show_bug.cgi?id=77183
+
+        Reviewed by Andreas Kling.
+
+        Rework testcases, to wait for the embedded SVG of the embedded HTML that we're loading.
+        Should fix the flakiness for both Qt/Chromium.
+
+        * platform/qt/Skipped: Unskip test.
+        * svg/as-object/nested-embedded-svg-size-changes.html: Wait for the embedded SVG to load, before trying to access it.
+        * svg/as-object/resources/nested-embedded-svg-size-changes-target.html:
+
 2012-02-09  Philip Rogers  <[email protected]>
 
         Fix mirroring with SVG fonts

Modified: trunk/LayoutTests/platform/qt/Skipped (107212 => 107213)


--- trunk/LayoutTests/platform/qt/Skipped	2012-02-09 11:44:28 UTC (rev 107212)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-02-09 11:44:55 UTC (rev 107213)
@@ -2534,10 +2534,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=77729
 fast/events/touch/emulate-touch-events.html 
 
-# [Qt] REGRESSION(r106918): It made svg/as-object/nested-embedded-svg-size-changes.html fail in debug mode
-# https://bugs.webkit.org/show_bug.cgi?id=78026
-svg/as-object/nested-embedded-svg-size-changes.html
-
 # [Qt] fast/text/international/inline-plaintext-is-isolated.html fails
 # https://bugs.webkit.org/show_bug.cgi?id=78092
 fast/text/international/inline-plaintext-is-isolated.html

Modified: trunk/LayoutTests/svg/as-object/nested-embedded-svg-size-changes.html (107212 => 107213)


--- trunk/LayoutTests/svg/as-object/nested-embedded-svg-size-changes.html	2012-02-09 11:44:28 UTC (rev 107212)
+++ trunk/LayoutTests/svg/as-object/nested-embedded-svg-size-changes.html	2012-02-09 11:44:55 UTC (rev 107213)
@@ -23,12 +23,22 @@
         shouldBeEqualToString("document.defaultView.getComputedStyle(object1).width", "400px");
         shouldBeEqualToString("document.defaultView.getComputedStyle(object1).height", "200px");
 
-        setTimeout(function() {
-            var htmlDoc = object1.contentDocument;
-            var htmlWindow = htmlDoc.defaultView;
+        if (window.layoutTestController)
+            layoutTestController.waitUntilDone();
+        requestSizeChange();
+    }
+
+    function requestSizeChange() {
+        object1 = document.getElementsByTagName("object")[0];
+        var htmlDoc = object1.contentDocument;
+        var htmlWindow = htmlDoc.defaultView;
+
+        // Wait until the embedded SVG (of the embedded HTML that we're loading), is loaded.
+        if (htmlWindow.canChangeSize) {
             htmlWindow.changeSize();
             test3();
-        }, 0);
+        } else
+            setTimeout(requestSizeChange, 50);
     }
 
     function test3() {
@@ -62,8 +72,6 @@
 <div id="console"></div>
 
 <script>
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
     description("This test checks that intrinsic size changes of an embedded SVG cause immediate updates of the object that embeds it.");
     test1();
 </script>

Modified: trunk/LayoutTests/svg/as-object/resources/nested-embedded-svg-size-changes-target.html (107212 => 107213)


--- trunk/LayoutTests/svg/as-object/resources/nested-embedded-svg-size-changes-target.html	2012-02-09 11:44:28 UTC (rev 107212)
+++ trunk/LayoutTests/svg/as-object/resources/nested-embedded-svg-size-changes-target.html	2012-02-09 11:44:55 UTC (rev 107213)
@@ -1,7 +1,13 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <body style="margin: 0px">
-<object data=""
+<object _onload_='documentLoaded()' data=""
 <script>
+window.canChangeSize = false;
+
+function documentLoaded() {
+    window.canChangeSize = true;
+}
+
 function changeSize() {
     // Forward size change request to embedded SVG document.
     var myObject = document.getElementsByTagName("object")[0];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to