Changeset 51037 in webkit
- Timestamp:
- Nov 16, 2009 7:37:09 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51036 r51037 1 2009-11-14 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Kenneth Christiansen. 4 5 [Qt] Implement load error pages support for Qt's DRT. 6 https://bugs.webkit.org/show_bug.cgi?id=31509 7 8 For now, it will not be a default feature, and layout tests 9 that want to make use of this have to explicitily call 10 'handleErrorPages();' for the test source. 11 12 Any of the other DumpRenderTree's (mac, win and gtk) 13 support handling error pages. Qt's will be the first. 14 15 * DumpRenderTree/qt/DumpRenderTree.cpp: 16 (WebCore::WebPage::supportsExtension): 17 (WebCore::WebPage::extension): 18 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 19 (LayoutTestController::reset): 20 * DumpRenderTree/qt/LayoutTestControllerQt.h: 21 (LayoutTestController::shouldHandleErrorPages): 22 (LayoutTestController::handleErrorPages): 23 1 24 2009-11-16 Eric Seidel <eric@webkit.org> 2 25 -
trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
r50959 r51037 215 215 } 216 216 217 bool WebPage::supportsExtension(QWebPage::Extension extension) const 218 { 219 if (extension == QWebPage::ErrorPageExtension) 220 return m_drt->layoutTestController()->shouldHandleErrorPages(); 221 222 return false; 223 } 224 225 bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output) 226 { 227 const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option); 228 229 // Lets handle error pages for the main frame for now. 230 if (info->frame != mainFrame()) 231 return false; 232 233 QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output); 234 235 errorPage->content = QString("data:text/html,<body/>").toUtf8(); 236 237 return true; 238 } 239 217 240 DumpRenderTree::DumpRenderTree() 218 241 : m_dumpPixels(false) -
trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
r50942 r51037 68 68 void resetSettings(); 69 69 void enableTextOutput(bool enable) { m_enableTextOutput = enable; } 70 71 virtual bool supportsExtension(QWebPage::Extension extension) const; 72 virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output); 70 73 71 74 public slots: -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r50938 r51037 65 65 m_topLoadingFrame = 0; 66 66 m_waitForPolicy = false; 67 m_handleErrorPages = false; 67 68 qt_dump_editing_callbacks(false); 68 69 qt_dump_resource_load_callbacks(false); -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
r50621 r51037 64 64 bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; } 65 65 bool shouldWaitUntilDone() const { return m_waitForDone; } 66 bool shouldHandleErrorPages() const { return m_handleErrorPages; } 66 67 bool canOpenWindows() const { return m_canOpenWindows; } 67 68 bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; } … … 88 89 void notifyDone(); 89 90 void dumpBackForwardList() { m_dumpBackForwardList = true; } 91 void handleErrorPages() { m_handleErrorPages = true; } 90 92 void dumpEditingCallbacks(); 91 93 void dumpResourceLoadCallbacks(); … … 141 143 bool m_dumpStatusCallbacks; 142 144 bool m_waitForPolicy; 145 bool m_handleErrorPages; 143 146 144 147 QBasicTimer m_timeoutTimer;
Note: See TracChangeset
for help on using the changeset viewer.