Changeset 107171 in webkit
- Timestamp:
- Feb 8, 2012, 8:04:54 PM (15 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
DumpRenderTree/qt/DumpRenderTreeQt.cpp (modified) (1 diff)
-
DumpRenderTree/qt/DumpRenderTreeQt.h (modified) (1 diff)
-
DumpRenderTree/qt/LayoutTestControllerQt.cpp (modified) (3 diffs)
-
DumpRenderTree/qt/LayoutTestControllerQt.h (modified) (2 diffs)
-
DumpRenderTree/qt/main.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r107165 r107171 1 2012-02-08 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 [Qt][DRT] DumpRenderTreeQt should support --no-timeout and --timeout options 4 https://bugs.webkit.org/show_bug.cgi?id=78146 5 6 Reviewed by Ryosuke Niwa. 7 8 Our DumpRenderTree should support --no-timeout and --timeout options in order 9 to be able to use run-perf-tests and have a Performance Bot. 10 This patch adds setTimeout and setShouldTimeout functions to our LayoutTestController 11 and the necessary code to handle such command line arguments to our DumpRenderTree. 12 13 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 14 (WebCore::DumpRenderTree::setTimeout): 15 (WebCore): 16 (WebCore::DumpRenderTree::setShouldTimeout): 17 * DumpRenderTree/qt/DumpRenderTreeQt.h: 18 (DumpRenderTree): 19 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 20 (LayoutTestController::LayoutTestController): 21 (LayoutTestController::waitUntilDone): 22 (LayoutTestController::notifyDone): 23 * DumpRenderTree/qt/LayoutTestControllerQt.h: 24 (LayoutTestController::setTimeout): 25 (LayoutTestController::setShouldTimeout): 26 (LayoutTestController): 27 * DumpRenderTree/qt/main.cpp: 28 (isOption): 29 (printUsage): 30 (main): 31 1 32 2012-02-08 Gustavo Noronha Silva <gns@gnome.org> 2 33 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r105876 r107171 1139 1139 } 1140 1140 1141 } 1141 void DumpRenderTree::setTimeout(int timeout) 1142 { 1143 m_controller->setTimeout(timeout); 1144 } 1145 1146 void DumpRenderTree::setShouldTimeout(bool flag) 1147 { 1148 m_controller->setShouldTimeout(flag); 1149 } 1150 1151 } -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
r105876 r107171 107 107 void setRedirectErrorFileName(const QString& fileName) { m_redirectErrorFileName = fileName; } 108 108 109 void setTimeout(int); 110 void setShouldTimeout(bool flag); 111 109 112 public Q_SLOTS: 110 113 void initJSObjects(); -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r106438 r107171 42 42 : QObject() 43 43 , m_drt(drt) 44 , m_shouldTimeout(true) 45 , m_timeout(30000) 44 46 { 45 47 reset(); … … 147 149 //qDebug() << ">>>>waitForDone"; 148 150 m_waitForDone = true; 149 m_timeoutTimer.start(30000, this); 151 152 if (!m_shouldTimeout) 153 return; 154 155 m_timeoutTimer.start(m_timeout, this); 150 156 } 151 157 … … 179 185 qDebug() << ">>>>notifyDone"; 180 186 181 if ( !m_timeoutTimer.isActive())187 if (m_shouldTimeout && !m_timeoutTimer.isActive()) 182 188 return; 183 189 -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
r106438 r107171 80 80 static const unsigned int maxViewWidth; 81 81 static const unsigned int maxViewHeight; 82 83 void setTimeout(int timeout) { m_timeout = timeout; } 84 void setShouldTimeout(bool flag) { m_shouldTimeout = flag; } 82 85 83 86 protected: … … 318 321 QStringList m_desktopNotificationAllowedOrigins; 319 322 bool m_ignoreDesktopNotification; 323 324 bool m_shouldTimeout; 325 int m_timeout; 320 326 }; 321 327 -
trunk/Tools/DumpRenderTree/qt/main.cpp
r106919 r107171 74 74 return str == QString("-v") || str == QString("--pixel-tests") 75 75 || str == QString("--stdout") || str == QString("--stderr") 76 || str == QString("--timeout") || str == QString("--no-timeout") 76 77 || str == QString("-"); 77 78 } … … 90 91 void printUsage() 91 92 { 92 fprintf(stderr, "Usage: DumpRenderTree [-v|--pixel-tests] [--stdout output_filename] [-stderr error_filename] filename [filename2..n]\n");93 fprintf(stderr, "Usage: DumpRenderTree [-v|--pixel-tests] [--stdout output_filename] [-stderr error_filename] [--no-timeout] [--timeout timeout_MS] filename [filename2..n]\n"); 93 94 fprintf(stderr, "Or folder containing test files: DumpRenderTree [-v|--pixel-tests] dirpath\n"); 94 95 fflush(stderr); … … 214 215 QWebDatabase::removeAllDatabases(); 215 216 217 index = args.indexOf(QLatin1String("--timeout")); 218 if (index != -1) { 219 int timeout = takeOptionValue(args, index).toInt(); 220 dumper.setTimeout(timeout); 221 args.removeAt(index); 222 } 223 224 index = args.indexOf(QLatin1String("--no-timeout")); 225 if (index != -1) { 226 dumper.setShouldTimeout(false); 227 args.removeAt(index); 228 } 229 216 230 index = args.indexOf(QLatin1String("-")); 217 231 if (index != -1) {
Note:
See TracChangeset
for help on using the changeset viewer.