[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ossy at webkit.org ossy at webkit.org
Thu Apr 8 00:14:08 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 4c25fd8806724a7a8927223c7f0d4591197490b0
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 3 14:06:57 2009 +0000

    WebKitTools: [Qt] Refactor DRT to not crash on tests which open child windows from javascript.
    Prevent DRT from showing the main view if these childs get deleted.
    This fixes https://bugs.webkit.org/show_bug.cgi?id=31591.
    
    Patch by Andras Becsi <abecsi at inf.u-szeged.hu> on 2009-12-03
    Reviewed by Kenneth Rohde Christiansen.
    
    * DumpRenderTree/qt/DumpRenderTree.cpp:
    (WebCore::WebPage::WebPage):
    (WebCore::DumpRenderTree::DumpRenderTree):
    (WebCore::DumpRenderTree::~DumpRenderTree):
    (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
    (WebCore::DumpRenderTree::open):
    (WebCore::DumpRenderTree::closeRemainingWindows):
    (WebCore::DumpRenderTree::createWindow):
    (WebCore::DumpRenderTree::windowCount):
    * DumpRenderTree/qt/DumpRenderTree.h:
    
    LayoutTests: [Qt] Re-enable previously skipped tests.
    https://bugs.webkit.org/show_bug.cgi?id=31591
    
    Patch by Andras Becsi <abecsi at inf.u-szeged.hu> on 2009-12-03
    Reviewed by Kenneth Rohde Christiansen.
    
    * platform/qt/Skipped:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e0491e3..5e67499 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-03  Andras Becsi  <abecsi at inf.u-szeged.hu>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Re-enable previously skipped tests.
+        https://bugs.webkit.org/show_bug.cgi?id=31591
+
+        * platform/qt/Skipped:
+
 2009-12-03  Csaba Osztrogonác  <ossy at webkit.org>
 
         [Qt] Put test into skiplist because of missing layoutTestController.evaluateInWebInspector().
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 9b48b53..9dc96c7 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5103,131 +5103,6 @@ websocket/tests
 # Need rebaseline: https://bugs.webkit.org/show_bug.cgi?id=26830
 fast/multicol/single-line.html
 
-# ================================================================== #
-# After we updated to Qt-4.6.0-stable/Qt-4.6.0-RC1 there are 24      #
-# crashing tests on QtBuildBot. These crashes caused by previously   #
-# tests. Temporarily we disabled them until find and fix the bug.    #
-#                                                                    #
-# https://bugs.webkit.org/show_bug.cgi?id=31591                      #
-# ================================================================== #
-
-#crashed: fast/dom/mutation-event-remove-inserted-node.html
-#crasher:
-fast/dom/location-new-window-no-crash.html
-
-#crashed: fast/dom/Document/invalid-domain-change-throws-exception.html
-#crasher:
-fast/dom/Document/early-document-access.html
-
-#crashed: fast/dom/Window/console-functions.html
-#crasher:
-fast/dom/Window/closure-access-after-navigation-window.html
-
-#crashed: fast/dom/Window/element-constructors-on-window.html
-#crasher:
-fast/dom/Window/dom-access-from-closure-window.html
-
-#crashed: fast/dom/Window/timeout-callback-scope.html
-#crasher:
-fast/dom/Window/setting-properties-on-closed-window.html
-
-#crashed: fast/dom/Window/window-frames-self-referential.html
-#crasher:
-fast/dom/Window/window-early-properties.html
-
-#crashed: fast/dom/Window/window-open-self-from-other-frame.html
-#crasher:
-fast/dom/Window/window-open-pending-url.html
-
-#crashed: fast/events/option-tab.html
-#crasher:
-fast/events/open-window-from-another-frame.html
-
-#crashed: fast/events/programmatic-check-no-change-event.html
-#crasher:
-fast/events/popup-blocking-click-in-iframe.html
-
-#crashed: fast/history/back-forward-reset-after-error-handling.html
-#crasher:
-fast/harness/use-page-cache.html
-
-#crashed: http/tests/misc/submit-get-in-utf16be.html
-#crasher:
-http/tests/misc/slow-preload-cancel.html
-
-#crashed: http/tests/misc/xhtml.php
-#crasher:
-http/tests/misc/window-open-then-write.html
-
-#crashed: http/tests/security/window-events-clear-port.html
-http/tests/security/window-events-clear-domain.html
-
-#crashed: http/tests/security/xss-DENIED-assign-location-hash.html
-#crasher and crashed previously:
-http/tests/security/window-events-clear-port.html
-
-#crashed: http/tests/security/xss-DENIED-assign-location-hash.html
-#crasher:
-http/tests/security/window-events-pass.html
-
-#crashed: http/tests/security/aboutBlank/xss-DENIED-set-opener.html
-#crasher:
-http/tests/security/aboutBlank/window-open-self-about-blank.html
-
-#crashed: http/tests/security/cookies/assign-document-url.html
-#crasher and crashed previously:
-http/tests/security/aboutBlank/xss-DENIED-set-opener.html
-
-#crashed: http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html
-#crasher:
-http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html
-
-#crashed: http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html
-#crasher:
-http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open.html
-
-#crashed: http/tests/security/frameNavigation/opener.html
-#crasher:
-http/tests/security/frameNavigation/cross-origin-opener.html
-
-#crashed: http/tests/security/frameNavigation/xss-ALLOWED-parent-navigation-change.html
-#crasher and crashed previously:
-http/tests/security/frameNavigation/opener.html
-
-#crashed: http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html
-#crasher:
-http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
-
-#crashed: http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html
-#crasher:
-http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html
-
-#crashed: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
-#crasher:
-http/tests/xmlhttprequest/close-window.html
-
-#crashed: http/tests/xmlhttprequest/response-encoding.html
-#crasher:
-http/tests/xmlhttprequest/request-from-popup.html
-
-#crashed: scrollbars/scrollbar-crash-on-refresh.html
-#crasher:
-plugins/window-open.html
-
-#crashed: storage/domstorage/sessionstorage/delete-removal.html
-#crasher:
-storage/domstorage/localstorage/window-open.html
-
-#crashed: svg/carto.net/frameless-svg-parse-error.html
-#crasher:
-storage/domstorage/sessionstorage/window-open.html
-
-#Crash caused by http://trac.webkit.org/changeset/51577
-#crashed: fast/frames/sandboxed-iframe-plugins.html
-#crasher:
-fast/frames/sandboxed-iframe-navigation-windowopen.html 
-# ================================================================== #
-
 # Tests requiring 3D_RENDERING and ACCELERATED_COMPOSITING support
 animations/3d
 transforms/3d
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 389a313..cf082ce 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,22 @@
+2009-12-03  Andras Becsi  <abecsi at inf.u-szeged.hu>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Refactor DRT to not crash on tests which open child windows from javascript.
+        Prevent DRT from showing the main view if these childs get deleted.
+        This fixes https://bugs.webkit.org/show_bug.cgi?id=31591.
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::WebPage::WebPage):
+        (WebCore::DumpRenderTree::DumpRenderTree):
+        (WebCore::DumpRenderTree::~DumpRenderTree):
+        (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+        (WebCore::DumpRenderTree::open):
+        (WebCore::DumpRenderTree::closeRemainingWindows):
+        (WebCore::DumpRenderTree::createWindow):
+        (WebCore::DumpRenderTree::windowCount):
+        * DumpRenderTree/qt/DumpRenderTree.h:
+
 2009-12-02  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
index 9ad7583..b05938c 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -41,9 +41,6 @@
 #include <QCryptographicHash>
 #include <QDir>
 #include <QFile>
-#include <QTimer>
-#include <QBoxLayout>
-#include <QScrollArea>
 #include <QApplication>
 #include <QUrl>
 #include <QFileInfo>
@@ -54,9 +51,6 @@
 #include <QNetworkRequest>
 #include <QUndoStack>
 
-#include <qwebpage.h>
-#include <qwebframe.h>
-#include <qwebview.h>
 #include <qwebsettings.h>
 #include <qwebsecurityorigin.h>
 
@@ -114,7 +108,7 @@ void NetworkAccessManager::sslErrorsEncountered(QNetworkReply* reply, const QLis
 }
 #endif
 
-WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
+WebPage::WebPage(QObject* parent, DumpRenderTree* drt)
     : QWebPage(parent)
     , m_drt(drt)
 {
@@ -298,10 +292,10 @@ DumpRenderTree::DumpRenderTree()
     QWebSettings::enablePersistentStorage();
 
     // create our primary testing page/view.
-    QWebView *view = new QWebView(0);
-    view->resize(QSize(maxViewWidth, maxViewHeight));
-    m_page = new WebPage(view, this);
-    view->setPage(m_page);
+    m_mainView = new QWebView(0);
+    m_mainView->resize(QSize(maxViewWidth, maxViewHeight));
+    m_page = new WebPage(m_mainView, this);
+    m_mainView->setPage(m_page);
 
     // create out controllers. This has to be done before connectFrame,
     // as it exports there to the JavaScript DOM window.
@@ -329,13 +323,12 @@ DumpRenderTree::DumpRenderTree()
     QObject::connect(this, SIGNAL(quit()), qApp, SLOT(quit()), Qt::QueuedConnection);
     qt_drt_run(true);
     QFocusEvent event(QEvent::FocusIn, Qt::ActiveWindowFocusReason);
-    QApplication::sendEvent(view, &event);
+    QApplication::sendEvent(m_mainView, &event);
 }
 
 DumpRenderTree::~DumpRenderTree()
 {
-    delete m_page;
-
+    delete m_mainView;
     delete m_stdin;
     delete m_notifier;
 }
@@ -382,7 +375,7 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting()
 
     closeRemainingWindows();
 
-    static_cast<WebPage*>(m_page)->resetSettings();
+    m_page->resetSettings();
     m_page->undoStack()->clear();
     m_page->mainFrame()->setZoomFactor(1.0);
     clearHistory(m_page);
@@ -418,7 +411,7 @@ void DumpRenderTree::open(const QUrl& aurl)
     bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
     int width = isW3CTest ? 480 : maxViewWidth;
     int height = isW3CTest ? 360 : maxViewHeight;
-    m_page->view()->resize(QSize(width, height));
+    m_mainView->resize(QSize(width, height));
     m_page->setPreferredContentsSize(QSize());
     m_page->setViewportSize(QSize(width, height));
 
@@ -462,7 +455,7 @@ void DumpRenderTree::setDumpPixels(bool dump)
 
 void DumpRenderTree::closeRemainingWindows()
 {
-    foreach(QWidget *widget, windows)
+    foreach (QObject* widget, windows)
         delete widget;
     windows.clear();
 }
@@ -713,25 +706,28 @@ QWebPage *DumpRenderTree::createWindow()
 {
     if (!m_controller->canOpenWindows())
         return 0;
-    QWidget *container = new QWidget(0);
-    container->resize(0, 0);
-    container->move(-1, -1);
-    container->hide();
-    WebPage *page = new WebPage(container, this);
-    connectFrame(page->mainFrame());
-    connect(page, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(connectFrame(QWebFrame *)));
+
+    // Create a dummy container object to track the page in DRT.
+    // QObject is used instead of QWidget to prevent DRT from
+    // showing the main view when deleting the container.
+
+    QObject* container = new QObject(m_mainView);
+    // create a QWebPage we want to return
+    QWebPage* page = static_cast<QWebPage*>(new WebPage(container, this));
+    // gets cleaned up in closeRemainingWindows()
     windows.append(container);
+
+    // connect the needed signals to the page
+    connect(page, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(connectFrame(QWebFrame*)));
+    connectFrame(page->mainFrame());
+    connect(page, SIGNAL(loadFinished(bool)), m_controller, SLOT(maybeDump(bool)));
     return page;
 }
 
 int DumpRenderTree::windowCount() const
 {
-    int count = 0;
-    foreach(QWidget *w, windows) {
-        if (w->children().count())
-            ++count;
-    }
-    return count + 1;
+// include the main view in the count
+    return windows.count() + 1;
 }
 
 #if defined(Q_WS_X11)
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
index 2da789b..3d1fac3 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
@@ -40,7 +40,9 @@
 #include <QSslError>
 #endif
 
+#include <qwebframe.h>
 #include <qwebpage.h>
+#include <qwebview.h>
 
 QT_BEGIN_NAMESPACE
 class QUrl;
@@ -114,6 +116,7 @@ private:
     QString m_expectedHash;
 
     WebPage *m_page;
+    QWebView* m_mainView;
 
     EventSender *m_eventSender;
     TextInputController *m_textInputController;
@@ -122,7 +125,7 @@ private:
     QFile *m_stdin;
     QSocketNotifier* m_notifier;
 
-    QList<QWidget *> windows;
+    QList<QObject*> windows;
     bool m_enableTextOutput;
 };
 
@@ -140,7 +143,7 @@ private slots:
 class WebPage : public QWebPage {
     Q_OBJECT
 public:
-    WebPage(QWidget *parent, DumpRenderTree *drt);
+    WebPage(QObject* parent, DumpRenderTree*);
 
     QWebPage *createWindow(QWebPage::WebWindowType);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list