Title: [223800] trunk/LayoutTests
- Revision
- 223800
- Author
- rn...@webkit.org
- Date
- 2017-10-20 16:55:35 -0700 (Fri, 20 Oct 2017)
Log Message
http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=178606
Reviewed by Wenson Hsieh.
The bug was caused by the race condition during the page loading of iframes.
Waiting for message event wasn't doing anything useful because it was receiving the message from
source iframe before the drag & drop had started.
Fixed the bug by waiting for the second message event. Also replaced the wait for load event
by the wait for the first message event for clarity.
* http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (223799 => 223800)
--- trunk/LayoutTests/ChangeLog 2017-10-20 23:40:21 UTC (rev 223799)
+++ trunk/LayoutTests/ChangeLog 2017-10-20 23:55:35 UTC (rev 223800)
@@ -1,3 +1,20 @@
+2017-10-20 Ryosuke Niwa <rn...@webkit.org>
+
+ http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=178606
+
+ Reviewed by Wenson Hsieh.
+
+ The bug was caused by the race condition during the page loading of iframes.
+
+ Waiting for message event wasn't doing anything useful because it was receiving the message from
+ source iframe before the drag & drop had started.
+
+ Fixed the bug by waiting for the second message event. Also replaced the wait for load event
+ by the wait for the first message event for clarity.
+
+ * http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html:
+
2017-10-20 Ryan Haddad <ryanhad...@apple.com>
[iOS] Rebaseline compositing tests
Modified: trunk/LayoutTests/http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html (223799 => 223800)
--- trunk/LayoutTests/http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html 2017-10-20 23:40:21 UTC (rev 223799)
+++ trunk/LayoutTests/http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html 2017-10-20 23:55:35 UTC (rev 223800)
@@ -22,7 +22,15 @@
+ 'To manually test, drag & drop the content in the block above to the blue box on the right.');
jsTestIsAsync = true;
-window._onload_ = () => {
+let loadCount = 0;
+window._onmessage_ = (event) => {
+ if (!loadCount++)
+ runTest()
+ else
+ checkFrameAccess();
+}
+
+function runTest() {
document.getElementById('source').focus();
document.execCommand('selectAll');
if (window.testRunner) {
@@ -58,8 +66,6 @@
}
});
observer.observe(destination, {childList: true, subtree: true});
-
- window._onmessage_ = checkFrameAccess;
}
function checkFrameAccess() {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes