Title: [202428] trunk/LayoutTests
Revision
202428
Author
[email protected]
Date
2016-06-24 10:34:42 -0700 (Fri, 24 Jun 2016)

Log Message

Make window.open layout tests for about: URLs work on iOS
https://bugs.webkit.org/show_bug.cgi?id=159072

Reviewed by Alex Christensen.

Fix two window.open layout tests for iOS. They previously used click events.
Now they instead turn off the popup blocker and just call window.open() on
the load event.

* http/tests/dom/window-open-about-blank-and-access-document-expected.txt:
* http/tests/dom/window-open-about-blank-and-access-document.html:
* http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt:
* http/tests/dom/window-open-about-webkit-org-and-access-document.html:
* platform/ios-simulator/TestExpectations:
    Removed the skipping of these two test cases.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (202427 => 202428)


--- trunk/LayoutTests/ChangeLog	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/ChangeLog	2016-06-24 17:34:42 UTC (rev 202428)
@@ -1,3 +1,21 @@
+2016-06-24  John Wilander  <[email protected]>
+
+        Make window.open layout tests for about: URLs work on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=159072
+
+        Reviewed by Alex Christensen.
+
+        Fix two window.open layout tests for iOS. They previously used click events.
+        Now they instead turn off the popup blocker and just call window.open() on
+        the load event.
+
+        * http/tests/dom/window-open-about-blank-and-access-document-expected.txt:
+        * http/tests/dom/window-open-about-blank-and-access-document.html:
+        * http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt:
+        * http/tests/dom/window-open-about-webkit-org-and-access-document.html:
+        * platform/ios-simulator/TestExpectations:
+            Removed the skipping of these two test cases.
+
 2016-06-24  Yusuke Suzuki  <[email protected]>
 
         [GTK][EFL] ImageBufferCairo should accept resolution factor

Modified: trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document-expected.txt (202427 => 202428)


--- trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document-expected.txt	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document-expected.txt	2016-06-24 17:34:42 UTC (rev 202428)
@@ -1,4 +1,3 @@
 CONSOLE MESSAGE: line 1: Injected script running.
-
 PASS newWindow.document is defined.
 

Modified: trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document.html (202427 => 202428)


--- trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document.html	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/http/tests/dom/window-open-about-blank-and-access-document.html	2016-06-24 17:34:42 UTC (rev 202428)
@@ -10,19 +10,20 @@
         if (window.testRunner) {
             testRunner.setCanOpenWindows();
             testRunner.waitUntilDone();
+            testRunner.setPopupBlockingEnabled(false);
         }
 
-        function checkNewWindowDocumentIsUndefined () {
+        function checkNewWindowDocumentIsDefined () {
             shouldBeDefined("newWindow.document");
             if (window.testRunner)
                 testRunner.notifyDone();
         }
 
-        function clickHandler() {
+        function run() {
             newWindow = window.open("about:blank");
             try {
                 newWindow.document.write("<scri" + "pt>console.log('Injected script running.')</sc" + "ript>");
-                setTimeout(checkNewWindowDocumentIsUndefined, 500);
+                setTimeout(checkNewWindowDocumentIsDefined, 500);
             } catch (e) {
                 testFailed("Was not able to write to the new window's document.");
                 if (window.testRunner)
@@ -29,21 +30,9 @@
                     testRunner.notifyDone();
             }
         }
-
-        function clickButton() {
-            var button = document.getElementById("test");
-            var buttonX = button.offsetLeft + button.offsetWidth / 2;
-            var buttonY = button.offsetTop + button.offsetHeight / 2;
-            if (window.eventSender) {
-                eventSender.mouseMoveTo(buttonX, buttonY);
-                eventSender.mouseDown();
-                eventSender.mouseUp();
-            }
-        }
     </script>
 </head>
-<body _onload_="clickButton()">
-<button id="test" _onclick_="clickHandler()"></button>
+<body _onload_="run()">
 <div id="console"></div>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt (202427 => 202428)


--- trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt	2016-06-24 17:34:42 UTC (rev 202428)
@@ -1,7 +1,6 @@
-CONSOLE MESSAGE: line 45: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "about". Protocols must match.
+CONSOLE MESSAGE: line 34: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "about". Protocols must match.
 
 CONSOLE MESSAGE: line 347: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "about". Protocols must match.
 
-
 PASS newWindow.document is undefined.
 

Modified: trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html (202427 => 202428)


--- trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html	2016-06-24 17:34:42 UTC (rev 202428)
@@ -9,6 +9,7 @@
         if (window.testRunner) {
             testRunner.setCanOpenWindows();
             testRunner.waitUntilDone();
+            testRunner.setPopupBlockingEnabled(false);
         }
 
         function checkNewWindowDocumentIsUndefined () {
@@ -17,7 +18,7 @@
                 testRunner.notifyDone();
         }
 
-        function clickHandler() {
+        function run() {
             newWindow = window.open("about://webkit.org");
             try {
                 newWindow.document.write("<scri" + "pt>console.log('Injected script running.')</sc" + "ript>");
@@ -28,21 +29,9 @@
                 setTimeout(checkNewWindowDocumentIsUndefined, 500);
             }
         }
-
-        function clickButton() {
-            var button = document.getElementById("test");
-            var buttonX = button.offsetLeft + button.offsetWidth / 2;
-            var buttonY = button.offsetTop + button.offsetHeight / 2;
-            if (window.eventSender) {
-                eventSender.mouseMoveTo(buttonX, buttonY);
-                eventSender.mouseDown();
-                eventSender.mouseUp();
-            }
-        }
     </script>
 </head>
-<body _onload_="clickButton()">
-<button id="test" _onclick_="clickHandler()"></button>
+<body _onload_="run()">
 <div id="console"></div>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (202427 => 202428)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-06-24 17:32:58 UTC (rev 202427)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-06-24 17:34:42 UTC (rev 202428)
@@ -254,8 +254,6 @@
 fast/scrolling/scroll-animator-select-list-events.html [ Skip ]
 fast/events/prevent-default-prevents-interaction-with-scrollbars.html [ Skip ]
 fast/text/text-disappear-on-deselect.html [ ImageOnlyFailure ]
-http/tests/dom/window-open-about-blank-and-access-document.html [ Skip ]
-http/tests/dom/window-open-about-webkit-org-and-access-document.html [ Skip ]
 
 webkit.org/b/148695 fast/shadow-dom [ Pass ]
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to