2011-01-12 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 07:09:26 +0000 (07:09 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 07:09:26 +0000 (07:09 +0000)
        Reviewed by David Levin.

        Add beforeunload support to WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=52353

        * platform/mac-wk2/Skipped: Unskip a test that was failing solely due to missing
        beforeunload support.
2011-01-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by David Levin.

        Add beforeunload support to WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=52353

        This makes a number of currently failing tests pass.

        * WebKitTestRunner/TestController.cpp:
        (WTR::runBeforeUnloadConfirmPanel):
        (WTR::createOtherPage):
        (WTR::TestController::initialize):

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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
Source/WebCore/loader/FrameLoader.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index 0b1f3dd77c2fe201b736cc3df2701510b987633c..7520b491240713463915712326895ecc45c93fe2 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-12  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by David Levin.
+
+        Add beforeunload support to WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=52353
+
+        * platform/mac-wk2/Skipped: Unskip a test that was failing solely due to missing
+        beforeunload support.
+
 2011-01-12  Hayato Ito  <hayato@chromium.org>
 
         Unreviewed test expectations files fix.
index 42506bcd2615891997f4a850cc221daad9ccf49a..787037efeb3642216a5b1ad3f32a6d3ccc19cf49 100644 (file)
@@ -2036,9 +2036,6 @@ plugins/get-url-with-blank-target.html
 fast/parser/remove-misnested-iframe-in-beforeload.html
 fast/parser/remove-misnested-iframe-parent-in-beforeload.html
 
-# Unexplained failures that were formerly in the WebKitTestRunner needs to print onunload handler list.
-fast/events/onunload-clears-onbeforeunload.html
-
 # Unexplained failures that were formerly in the dumpChildFramesAsText list.
 fast/frames/sandboxed-iframe-storage.html
 http/tests/misc/isindex-with-no-form-base-href.html
index 34fa195ca96a767a8c9ccb0bb5956262c6b4d46b..7d99bab88bd87c2ca7f9c680f1232194a5ae7c43 100644 (file)
@@ -2882,6 +2882,8 @@ bool FrameLoader::shouldClose()
         NavigationDisablerForBeforeUnload navigationDisabler;
         size_t i;
 
+        puts("about to test for before unload events");
+
         for (i = 0; i < targetFrames.size(); i++) {
             if (!targetFrames[i]->tree()->isDescendantOf(m_frame))
                 continue;
index 8d02d446a90bc90596eae006bae2ffda2f631dd1..72b8f77e205047dc3e8a7cadb07ef58805680fe9 100644 (file)
@@ -1,3 +1,17 @@
+2011-01-12  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by David Levin.
+
+        Add beforeunload support to WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=52353
+        
+        This makes a number of currently failing tests pass.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::runBeforeUnloadConfirmPanel):
+        (WTR::createOtherPage):
+        (WTR::TestController::initialize):
+
 2011-01-12  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Sam Weinig.
index 58fdfb6b7f46c6826189ab5131863c4da228d4e4..699982e55ff4f08eb3e3d6a3aaf79cf5109d1c5d 100644 (file)
@@ -97,6 +97,12 @@ static void setWindowFrameOtherPage(WKPageRef page, WKRect frame, const void* cl
     view->setWindowFrame(frame);
 }
 
+static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo)
+{
+    printf("%s\n", toSTD(message).c_str());
+    return true;
+}
+
 static void closeOtherPage(WKPageRef page, const void* clientInfo)
 {
     WKPageClose(page);
@@ -134,7 +140,7 @@ static WKPageRef createOtherPage(WKPageRef oldPage, WKDictionaryRef, WKEventModi
         0, // setIsResizable
         getWindowFrameOtherPage,
         setWindowFrameOtherPage,
-        0, // runBeforeUnloadConfirmPanel
+        runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
         0, // exceededDatabaseQuota
@@ -239,7 +245,7 @@ void TestController::initialize(int argc, const char* argv[])
         0, // setIsResizable
         getWindowFrameMainPage,
         setWindowFrameMainPage,
-        0, // runBeforeUnloadConfirmPanel
+        runBeforeUnloadConfirmPanel,
         0, // didDraw
         0, // pageDidScroll
         0, // exceededDatabaseQuota