Changeset 53770 in webkit


Ignore:
Timestamp:
Jan 23, 2010 8:54:35 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-23 Robert Hogan <robert@roberthogan.net>

Reviewed by Kenneth Rohde Christiansen.

Qt DRT: respect window.close() and window.closed()

Qt DRT needs to maintain a correct count of open windows
for windowCount(). It also needs to delete windows that
have been closed by window.close().

This fixes the following tests:

plugins/destroy-during-npp-new.html
fast/dom/Document/early-document-access.html
fast/dom/Window/window-early-properties.html
fast/events/open-window-from-another-frame.html
fast/events/popup-blocking-click-in-iframe.html

https://bugs.webkit.org/show_bug.cgi?id=32953

  • platform/qt/Skipped:

2010-01-23 Robert Hogan <robert@roberthogan.net>

Reviewed by Kenneth Rohde Christiansen.

Qt DRT: respect window.close() and window.closed()

Qt DRT needs to maintain a correct count of open windows
for windowCount(). It also needs to delete windows that
have been closed by window.close().

This fixes the following tests:

plugins/destroy-during-npp-new.html
fast/dom/Document/early-document-access.html
fast/dom/Window/window-early-properties.html
fast/events/open-window-from-another-frame.html
fast/events/popup-blocking-click-in-iframe.html

https://bugs.webkit.org/show_bug.cgi?id=32953

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::DumpRenderTree::DumpRenderTree): (WebCore::DumpRenderTree::createWindow): (WebCore::DumpRenderTree::windowCloseRequested):
  • DumpRenderTree/qt/DumpRenderTreeQt.h:
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::maybeDump):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53767 r53770  
     12010-01-23  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Qt DRT: respect window.close() and window.closed()
     6       
     7        Qt DRT needs to maintain a correct count of open windows
     8        for windowCount(). It also needs to delete windows that
     9        have been closed by window.close().
     10       
     11        This fixes the following tests:
     12       
     13        plugins/destroy-during-npp-new.html
     14        fast/dom/Document/early-document-access.html
     15        fast/dom/Window/window-early-properties.html
     16        fast/events/open-window-from-another-frame.html
     17        fast/events/popup-blocking-click-in-iframe.html
     18       
     19        https://bugs.webkit.org/show_bug.cgi?id=32953
     20
     21        * platform/qt/Skipped:
     22
    1232010-01-23  Yury Semikhatsky  <yurys@chromium.org>
    224
  • trunk/LayoutTests/platform/qt/Skipped

    r53767 r53770  
    521521fast/text/international/002.html
    522522
    523 plugins/destroy-during-npp-new.html
    524523plugins/embed-attributes-setting.html
    525524plugins/get-url-that-the-resource-load-delegate-will-disallow.html
     
    50265025fast/dom/javascript-url-crash-function.html
    50275026fast/dom/location-new-window-no-crash.html
    5028 fast/dom/Document/early-document-access.html
    5029 fast/dom/Window/window-early-properties.html
    5030 fast/events/open-window-from-another-frame.html
    5031 fast/events/popup-blocking-click-in-iframe.html
    50325027inspector/console-clear.html
    50335028http/tests/misc/set-window-opener-to-null.html
  • trunk/WebKitTools/ChangeLog

    r53765 r53770  
     12010-01-23  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Qt DRT: respect window.close() and window.closed()
     6       
     7        Qt DRT needs to maintain a correct count of open windows
     8        for windowCount(). It also needs to delete windows that
     9        have been closed by window.close().
     10       
     11        This fixes the following tests:
     12       
     13        plugins/destroy-during-npp-new.html
     14        fast/dom/Document/early-document-access.html
     15        fast/dom/Window/window-early-properties.html
     16        fast/events/open-window-from-another-frame.html
     17        fast/events/popup-blocking-click-in-iframe.html
     18       
     19        https://bugs.webkit.org/show_bug.cgi?id=32953
     20
     21        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     22        (WebCore::DumpRenderTree::DumpRenderTree):
     23        (WebCore::DumpRenderTree::createWindow):
     24        (WebCore::DumpRenderTree::windowCloseRequested):
     25        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     26        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     27        (LayoutTestController::maybeDump):
     28
    1292010-01-23  Dan Bernstein  <mitz@apple.com>
    230
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r53616 r53770  
    345345    connect(m_page, SIGNAL(loadStarted()),
    346346            m_controller, SLOT(resetLoadFinished()));
     347    connect(m_page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
    347348
    348349    connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
     
    783784    connectFrame(page->mainFrame());
    784785    connect(page, SIGNAL(loadFinished(bool)), m_controller, SLOT(maybeDump(bool)));
     786    connect(page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
    785787    return page;
     788}
     789
     790void DumpRenderTree::windowCloseRequested()
     791{
     792    QWebPage* page = qobject_cast<QWebPage*>(sender());
     793    QObject* container = page->parent();
     794    windows.removeAll(container);
     795    container->deleteLater();
    786796}
    787797
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r53616 r53770  
    110110    void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName);
    111111    void statusBarMessage(const QString& message);
     112    void windowCloseRequested();
    112113
    113114Q_SIGNALS:
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r53635 r53770  
    8787}
    8888
    89 // Called on loadFinished on mainFrame.
     89// Called on loadFinished on WebPage
    9090void LayoutTestController::maybeDump(bool success)
    9191{
    92     Q_ASSERT(sender() == m_topLoadingFrame->page());
     92
     93    // This can happen on any of the http/tests/security/window-events-*.html tests, where the test opens
     94    // a new window, calls the unload and load event handlers on the window's page, and then immediately
     95    // issues a notifyDone. Needs investigation.
     96    if (!m_topLoadingFrame)
     97        return;
     98
     99    // It is possible that we get called by windows created from the main page that have finished
     100    // loading, so we don't ASSERT here. At the moment we do not gather results from such windows,
     101    // but may need to in future.
     102    if (sender() != m_topLoadingFrame->page())
     103        return;
    93104
    94105    m_loadFinished = true;
Note: See TracChangeset for help on using the changeset viewer.