Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 67198: Add concept of slow tests. (Closed)
Patch Set: do git pull, fix diff Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iostream> 5 #include <iostream>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/event_recorder.h" 10 #include "base/event_recorder.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 } 257 }
258 if (parsed_command_line.HasSwitch(test_shell::kNoTree)) { 258 if (parsed_command_line.HasSwitch(test_shell::kNoTree)) {
259 params.dump_tree = false; 259 params.dump_tree = false;
260 } 260 }
261 261
262 if (uri.length() == 0) { 262 if (uri.length() == 0) {
263 // Watch stdin for URLs. 263 // Watch stdin for URLs.
264 char filenameBuffer[kPathBufSize]; 264 char filenameBuffer[kPathBufSize];
265 while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) { 265 while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) {
266 char *newLine = strchr(filenameBuffer, '\n'); 266 char* newLine = strchr(filenameBuffer, '\n');
267 if (newLine) 267 if (newLine)
268 *newLine = '\0'; 268 *newLine = '\0';
269 if (!*filenameBuffer) 269 if (!*filenameBuffer)
270 continue; 270 continue;
271 271
272 params.test_url = filenameBuffer; 272 params.test_url = strtok(filenameBuffer, " ");
273
274 char* timeout = strtok(NULL, " ");
275 int old_timeout_ms = TestShell::GetLayoutTestTimeout();
276 if (timeout)
277 TestShell::SetFileTestTimeout(atoi(timeout));
278
273 if (!TestShell::RunFileTest(params)) 279 if (!TestShell::RunFileTest(params))
274 break; 280 break;
281
282 TestShell::SetFileTestTimeout(old_timeout_ms);
275 } 283 }
276 } else { 284 } else {
277 params.test_url = WideToUTF8(uri).c_str(); 285 params.test_url = WideToUTF8(uri).c_str();
278 TestShell::RunFileTest(params); 286 TestShell::RunFileTest(params);
279 } 287 }
280 288
281 shell->CallJSGC(); 289 shell->CallJSGC();
282 shell->CallJSGC(); 290 shell->CallJSGC();
283 if (shell) { 291 if (shell) {
284 // When we finish the last test, cleanup the LayoutTestController. 292 // When we finish the last test, cleanup the LayoutTestController.
(...skipping 19 matching lines...) Expand all
304 312
305 TestShell::ShutdownTestShell(); 313 TestShell::ShutdownTestShell();
306 TestShell::CleanupLogging(); 314 TestShell::CleanupLogging();
307 315
308 // Tear down shared StatsTable; prevents unit_tests from leaking it. 316 // Tear down shared StatsTable; prevents unit_tests from leaking it.
309 StatsTable::set_current(NULL); 317 StatsTable::set_current(NULL);
310 delete table; 318 delete table;
311 319
312 return 0; 320 return 0;
313 } 321 }
OLDNEW
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698