Title: [150594] trunk/LayoutTests
Revision
150594
Author
[email protected]
Date
2013-05-23 10:52:52 -0700 (Thu, 23 May 2013)

Log Message

Fix loader/go-back-cached-main-resource.html test
https://bugs.webkit.org/show_bug.cgi?id=116670

Patch by Manuel Rego Casasnovas <[email protected]> on 2013-05-23
Reviewed by Alexey Proskuryakov.

The page does not get an onload when being restored from page cache. The
test case case is modified to handle pageshow event instead.

* loader/go-back-cached-main-resource.html: Wait for the third
'first-page' message to finish the test.
* loader/resources/first-page.html: Use onpageshow instead of onload.
* loader/resources/other-page.html: Ditto.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (150593 => 150594)


--- trunk/LayoutTests/ChangeLog	2013-05-23 17:50:03 UTC (rev 150593)
+++ trunk/LayoutTests/ChangeLog	2013-05-23 17:52:52 UTC (rev 150594)
@@ -1,3 +1,18 @@
+2013-05-23  Manuel Rego Casasnovas  <[email protected]>
+
+        Fix loader/go-back-cached-main-resource.html test
+        https://bugs.webkit.org/show_bug.cgi?id=116670
+
+        Reviewed by Alexey Proskuryakov.
+
+        The page does not get an onload when being restored from page cache. The
+        test case case is modified to handle pageshow event instead.
+
+        * loader/go-back-cached-main-resource.html: Wait for the third
+        'first-page' message to finish the test.
+        * loader/resources/first-page.html: Use onpageshow instead of onload.
+        * loader/resources/other-page.html: Ditto.
+
 2013-05-23  Ryosuke Niwa  <[email protected]>
 
         Several editing tests that copy & paste slow down Mac WK2 EWS

Modified: trunk/LayoutTests/loader/go-back-cached-main-resource.html (150593 => 150594)


--- trunk/LayoutTests/loader/go-back-cached-main-resource.html	2013-05-23 17:50:03 UTC (rev 150593)
+++ trunk/LayoutTests/loader/go-back-cached-main-resource.html	2013-05-23 17:52:52 UTC (rev 150594)
@@ -22,6 +22,8 @@
             firstPageVisits++;
             if (firstPageVisits < 3)
                 target.postMessage('navigate-other-page', '*');
+            if (firstPageVisits == 3)
+                window.testRunner.notifyDone();
             return;
         }
 
@@ -32,12 +34,6 @@
                 break;
             case 2:
                 target.postMessage('navigate-back', '*');
-                // Wait a bit for resource load callbacks
-                setTimeout(function () {
-                    target.close();
-                    if (window.testRunner)
-                        window.testRunner.notifyDone();
-                    }, 200);
                 break;
             }
             return;

Modified: trunk/LayoutTests/loader/resources/first-page.html (150593 => 150594)


--- trunk/LayoutTests/loader/resources/first-page.html	2013-05-23 17:50:03 UTC (rev 150593)
+++ trunk/LayoutTests/loader/resources/first-page.html	2013-05-23 17:52:52 UTC (rev 150594)
@@ -18,6 +18,6 @@
     }
     </script>
 </head>
-<body _onload_="registerListeners();">
+<body _onpageshow_="registerListeners();">
 </body>
 </html>

Modified: trunk/LayoutTests/loader/resources/other-page.html (150593 => 150594)


--- trunk/LayoutTests/loader/resources/other-page.html	2013-05-23 17:50:03 UTC (rev 150593)
+++ trunk/LayoutTests/loader/resources/other-page.html	2013-05-23 17:52:52 UTC (rev 150594)
@@ -24,6 +24,6 @@
     }
     </script>
 </head>
-<body _onload_="registerListeners();">
+<body _onpageshow_="registerListeners();">
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to