LayoutTest http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 22:00:17 +0000 (22:00 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 22:00:17 +0000 (22:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178828

Reviewed by Wenson Hsieh.

When the pasted content's iframe's body isn't available, wait for load event.

* http/tests/security/clipboard/resources/content-to-copy.html: Always wait for load event before notifying
the parent page that it had finish loading.
* http/tests/security/clipboard/resources/subdirectory/paste-html.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/security/clipboard/resources/content-to-copy.html
LayoutTests/http/tests/security/clipboard/resources/subdirectory/paste-html.html

index e28365e..292461b 100644 (file)
@@ -1,3 +1,16 @@
+2017-10-26  Ryosuke Niwa  <rniwa@webkit.org>
+
+        LayoutTest http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=178828
+
+        Reviewed by Wenson Hsieh.
+
+        When the pasted content's iframe's body isn't available, wait for load event.
+
+        * http/tests/security/clipboard/resources/content-to-copy.html: Always wait for load event before notifying
+        the parent page that it had finish loading.
+        * http/tests/security/clipboard/resources/subdirectory/paste-html.html:
+
 2017-10-26  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [iOS] Update expected results for platform/ios/ios/fast/text/opticalFontWith*.html
index 745deb8..8446135 100644 (file)
@@ -3,7 +3,7 @@
 <body>
 <img src="mozilla.gif">
 <script>
-top.postMessage({type: 'contentLoaded'}, '*');
+window.onload = parent.postMessage({type: 'contentLoaded'}, '*');
 </script>
 </body>
 </html>
index cbc6022..627c0e9 100644 (file)
@@ -27,7 +27,7 @@ function doPaste(event) {
                         resolve();
                 }
 
-                if (frame.contentDocument && frame.contentDocument.body.innerHTML == '')
+                if (frame.contentDocument && (!frame.contentDocument.body || frame.contentDocument.body.innerHTML == ''))
                     frame.onload = waitForImage;
                 else
                     waitForImage();