Changeset 56606 in webkit


Ignore:
Timestamp:
Mar 25, 2010 11:34:57 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-03-25 Charlie Reis <creis@chromium.org>

Reviewed by Adam Barth.

onbeforeunload not called at window close + frame or iframe focused
https://bugs.webkit.org/show_bug.cgi?id=27481

Adds a layout test for bug 27481. Requires calling shouldClose on
the WebView, which is done with a new method on LayoutTestController.

  • fast/events/onbeforeunload-focused-iframe-expected.txt: Added.
  • fast/events/onbeforeunload-focused-iframe.html: Added.
  • fast/events/resources/onbeforeunload-focused-iframe-frame.html: Added.
  • platform/gtk/Skipped:
  • platform/qt/Skipped:

2010-03-25 Charlie Reis <creis@chromium.org>

Reviewed by Adam Barth.

onbeforeunload not called at window close + frame or iframe focused
https://bugs.webkit.org/show_bug.cgi?id=27481

Test: fast/events/onbeforeunload-focused-iframe.html

Replaces initial manual tests with a layout test.

  • manual-tests/onbeforeunload-focused-iframe.html: Removed.
  • manual-tests/resources/focused-iframe.html: Removed.

2010-03-25 Charlie Reis <creis@chromium.org>

Reviewed by Adam Barth.

onbeforeunload not called at window close + frame or iframe focused
https://bugs.webkit.org/show_bug.cgi?id=27481

Adds a callShouldCloseOnWebView method to LayoutTestController,
to allow automated testing for bug 27481.

  • DumpRenderTree/LayoutTestController.cpp: (callShouldCloseOnWebViewCallback): (LayoutTestController::staticFunctions):
  • DumpRenderTree/LayoutTestController.h:
  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::callShouldCloseOnWebView):
  • DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::callShouldCloseOnWebView):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::callShouldCloseOnWebView):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
  • DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::callShouldCloseOnWebView):
Location:
trunk
Files:
2 added
1 deleted
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56605 r56606  
     12010-03-25  Charlie Reis  <creis@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        onbeforeunload not called at window close + frame or iframe focused
     6        https://bugs.webkit.org/show_bug.cgi?id=27481
     7
     8        Adds a layout test for bug 27481.  Requires calling shouldClose on
     9        the WebView, which is done with a new method on LayoutTestController.
     10
     11        * fast/events/onbeforeunload-focused-iframe-expected.txt: Added.
     12        * fast/events/onbeforeunload-focused-iframe.html: Added.
     13        * fast/events/resources/onbeforeunload-focused-iframe-frame.html: Added.
     14        * platform/gtk/Skipped:
     15        * platform/qt/Skipped:
     16
    1172010-03-25  Eric Seidel  <eric@webkit.org>
    218
  • trunk/LayoutTests/fast/events/resources/onbeforeunload-focused-iframe-frame.html

    r56605 r56606  
    77        {
    88            document.getElementById("box").focus();
     9            window.top.simulateCloseWindow();
    910        }
    1011    </script>
  • trunk/LayoutTests/platform/gtk/Skipped

    r56578 r56606  
    57635763fast/frames/flattening/
    57645764
     5765# Implement LayoutTestController::callShouldCloseOnWebView()
     5766fast/events/onbeforeunload-focused-iframe.html
     5767
    57655768# Crashes on release/debug bots, see https://bugs.webkit.org/show_bug.cgi?id=35080
    57665769fast/css/font-face-opentype.html
  • trunk/LayoutTests/platform/qt/Skipped

    r56578 r56606  
    51595159fast/css/dashboard-regions-attr-crash.html
    51605160
     5161# Implement LayoutTestController::callShouldCloseOnWebView()
     5162fast/events/onbeforeunload-focused-iframe.html
     5163
    51615164# [Qt] REGRESSION(r54811) fast/canvas/drawImage-with-negative-source-destination.html fails
    51625165# https://bugs.webkit.org/show_bug.cgi?id=35005
  • trunk/WebCore/ChangeLog

    r56604 r56606  
     12010-03-25  Charlie Reis  <creis@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        onbeforeunload not called at window close + frame or iframe focused
     6        https://bugs.webkit.org/show_bug.cgi?id=27481
     7
     8        Test: fast/events/onbeforeunload-focused-iframe.html
     9
     10        Replaces initial manual tests with a layout test.
     11
     12        * manual-tests/onbeforeunload-focused-iframe.html: Removed.
     13        * manual-tests/resources/focused-iframe.html: Removed.
     14
    1152010-03-25  Eric Uhrhane  <ericu@chromium.org>
    216
  • trunk/WebKitTools/ChangeLog

    r56602 r56606  
     12010-03-25  Charlie Reis  <creis@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        onbeforeunload not called at window close + frame or iframe focused
     6        https://bugs.webkit.org/show_bug.cgi?id=27481
     7
     8        Adds a callShouldCloseOnWebView method to LayoutTestController,
     9        to allow automated testing for bug 27481.
     10
     11        * DumpRenderTree/LayoutTestController.cpp:
     12        (callShouldCloseOnWebViewCallback):
     13        (LayoutTestController::staticFunctions):
     14        * DumpRenderTree/LayoutTestController.h:
     15        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     16        (LayoutTestController::callShouldCloseOnWebView):
     17        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
     18        (LayoutTestController::callShouldCloseOnWebView):
     19        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     20        (LayoutTestController::callShouldCloseOnWebView):
     21        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     22        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
     23        (LayoutTestController::callShouldCloseOnWebView):
     24
    1252010-03-25  Eric Seidel  <eric@webkit.org>
    226
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp

    r55893 r56606  
    281281}
    282282
     283static JSValueRef callShouldCloseOnWebViewCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     284{
     285    // Has mac & windows implementation
     286    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     287
     288    return JSValueMakeBoolean(context, controller->callShouldCloseOnWebView());
     289}
     290
    283291static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    284292{
     
    13951403        { "apiTestNewWindowDataLoadBaseURL", apiTestNewWindowDataLoadBaseURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    13961404        { "apiTestGoToCurrentBackForwardItem", apiTestGoToCurrentBackForwardItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1405        { "callShouldCloseOnWebView", callShouldCloseOnWebViewCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    13971406        { "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    13981407        { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.h

    r56566 r56606  
    4848    void clearBackForwardList();
    4949    void clearPersistentUserStyleSheet();
     50    bool callShouldCloseOnWebView();
    5051    JSStringRef copyDecodedHostName(JSStringRef name);
    5152    JSStringRef copyEncodedHostName(JSStringRef name);
  • trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r56566 r56606  
    621621}
    622622
     623bool LayoutTestController::callShouldCloseOnWebView()
     624{
     625    // FIXME: Implement for testing fix for https://bugs.webkit.org/show_bug.cgi?id=27481
     626    return false;
     627}
     628
    623629void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
    624630{
  • trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm

    r56566 r56606  
    116116}
    117117
     118bool LayoutTestController::callShouldCloseOnWebView()
     119{
     120    return [[mainFrame webView] shouldClose];
     121}
     122
    118123void LayoutTestController::clearAllDatabases()
    119124{
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r56566 r56606  
    528528}
    529529
     530bool LayoutTestController::callShouldCloseOnWebView()
     531{
     532    // FIXME: Implement for testing fix for https://bugs.webkit.org/show_bug.cgi?id=27481
     533    return false;
     534}
     535
    530536const unsigned LayoutTestController::maxViewWidth = 800;
    531537const unsigned LayoutTestController::maxViewHeight = 600;
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r56566 r56606  
    163163    int pageNumberForElementById(const QString& id, float width = 0, float height = 0);
    164164    int numberOfPages(float width = maxViewWidth, float height = maxViewHeight);
     165    bool callShouldCloseOnWebView();
    165166
    166167private slots:
  • trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp

    r56566 r56606  
    111111}
    112112
     113bool LayoutTestController::callShouldCloseOnWebView()
     114{
     115    COMPtr<IWebView> webView;
     116    if (FAILED(frame->webView(&webView)))
     117        return false;
     118
     119    COMPtr<IWebViewPrivate> viewPrivate;
     120    if (FAILED(webView->QueryInterface(&viewPrivate)))
     121        return false;
     122
     123    BOOL result;
     124    viewPrivate->shouldClose(&result);
     125    return result;
     126}
     127
    113128JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef name)
    114129{
Note: See TracChangeset for help on using the changeset viewer.