[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
tonikitoo at webkit.org
tonikitoo at webkit.org
Wed Apr 7 23:43:35 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 879ec18f6dec6ffe603189f0d12e43bc4f72c9cb
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 16 15:37:09 2009 +0000
[Qt] Implement load error pages support for Qt's DRT.
https://bugs.webkit.org/show_bug.cgi?id=31509
Reviewed by Kenneth Christiansen.
For now, it will not be a default feature, and layout tests
that want to make use of this have to explicitily call
'handleErrorPages();' for the test source.
Any of the other DumpRenderTree's (mac, win and gtk)
support handling error pages. Qt's will be the first.
* DumpRenderTree/qt/DumpRenderTree.cpp:
(WebCore::WebPage::supportsExtension):
(WebCore::WebPage::extension):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::reset):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController::shouldHandleErrorPages):
(LayoutTestController::handleErrorPages):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9449e7f..ae0a960 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,26 @@
+2009-11-14 Antonio Gomes <tonikitoo at webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Implement load error pages support for Qt's DRT.
+ https://bugs.webkit.org/show_bug.cgi?id=31509
+
+ For now, it will not be a default feature, and layout tests
+ that want to make use of this have to explicitily call
+ 'handleErrorPages();' for the test source.
+
+ Any of the other DumpRenderTree's (mac, win and gtk)
+ support handling error pages. Qt's will be the first.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::supportsExtension):
+ (WebCore::WebPage::extension):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ (LayoutTestController::shouldHandleErrorPages):
+ (LayoutTestController::handleErrorPages):
+
2009-11-16 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 6166a57..883874b 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -214,6 +214,29 @@ bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& r
return QWebPage::acceptNavigationRequest(frame, request, type);
}
+bool WebPage::supportsExtension(QWebPage::Extension extension) const
+{
+ if (extension == QWebPage::ErrorPageExtension)
+ return m_drt->layoutTestController()->shouldHandleErrorPages();
+
+ return false;
+}
+
+bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)
+{
+ const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option);
+
+ // Lets handle error pages for the main frame for now.
+ if (info->frame != mainFrame())
+ return false;
+
+ QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output);
+
+ errorPage->content = QString("data:text/html,<body/>").toUtf8();
+
+ return true;
+}
+
DumpRenderTree::DumpRenderTree()
: m_dumpPixels(false)
, m_stdin(0)
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
index c77d1a2..46a74ab 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
@@ -68,6 +68,9 @@ public:
void resetSettings();
void enableTextOutput(bool enable) { m_enableTextOutput = enable; }
+ virtual bool supportsExtension(QWebPage::Extension extension) const;
+ virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output);
+
public slots:
bool shouldInterruptJavaScript() { return false; }
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index ef574bd..d64664e 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -64,6 +64,7 @@ void LayoutTestController::reset()
m_timeoutTimer.stop();
m_topLoadingFrame = 0;
m_waitForPolicy = false;
+ m_handleErrorPages = false;
qt_dump_editing_callbacks(false);
qt_dump_resource_load_callbacks(false);
}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index dd504a6..e0add61 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -63,6 +63,7 @@ public:
bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
bool shouldWaitUntilDone() const { return m_waitForDone; }
+ bool shouldHandleErrorPages() const { return m_handleErrorPages; }
bool canOpenWindows() const { return m_canOpenWindows; }
bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; }
bool waitForPolicy() const { return m_waitForPolicy; }
@@ -87,6 +88,7 @@ public slots:
void keepWebHistory();
void notifyDone();
void dumpBackForwardList() { m_dumpBackForwardList = true; }
+ void handleErrorPages() { m_handleErrorPages = true; }
void dumpEditingCallbacks();
void dumpResourceLoadCallbacks();
void queueBackNavigation(int howFarBackward);
@@ -140,6 +142,7 @@ private:
bool m_dumpDatabaseCallbacks;
bool m_dumpStatusCallbacks;
bool m_waitForPolicy;
+ bool m_handleErrorPages;
QBasicTimer m_timeoutTimer;
QWebFrame* m_topLoadingFrame;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list