OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <fstream> | 5 #include <fstream> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 did_complete_action = SelectNextTab(); | 336 did_complete_action = SelectNextTab(); |
337 } else if (LowerCaseEqualsASCII(action, "selectprevtab")) { | 337 } else if (LowerCaseEqualsASCII(action, "selectprevtab")) { |
338 did_complete_action = SelectPreviousTab(); | 338 did_complete_action = SelectPreviousTab(); |
339 } else if (LowerCaseEqualsASCII(action, "showbookmarks")) { | 339 } else if (LowerCaseEqualsASCII(action, "showbookmarks")) { |
340 did_complete_action = ShowBookmarkBar(); | 340 did_complete_action = ShowBookmarkBar(); |
341 } else if (LowerCaseEqualsASCII(action, "setup")) { | 341 } else if (LowerCaseEqualsASCII(action, "setup")) { |
342 LaunchBrowserAndServer(); | 342 LaunchBrowserAndServer(); |
343 did_complete_action = true; | 343 did_complete_action = true; |
344 } else if (LowerCaseEqualsASCII(action, "sleep")) { | 344 } else if (LowerCaseEqualsASCII(action, "sleep")) { |
345 // This is for debugging, it probably shouldn't be used real tests. | 345 // This is for debugging, it probably shouldn't be used real tests. |
346 Sleep(kDebuggingTimeoutMsec); | 346 PlatformThread::Sleep(kDebuggingTimeoutMsec); |
347 did_complete_action = true; | 347 did_complete_action = true; |
348 } else if (LowerCaseEqualsASCII(action, "star")) { | 348 } else if (LowerCaseEqualsASCII(action, "star")) { |
349 did_complete_action = StarPage(); | 349 did_complete_action = StarPage(); |
350 } else if (LowerCaseEqualsASCII(action, "taskmanager")) { | 350 } else if (LowerCaseEqualsASCII(action, "taskmanager")) { |
351 did_complete_action = OpenTaskManagerDialog(); | 351 did_complete_action = OpenTaskManagerDialog(); |
352 } else if (LowerCaseEqualsASCII(action, "teardown")) { | 352 } else if (LowerCaseEqualsASCII(action, "teardown")) { |
353 CloseBrowserAndServer(); | 353 CloseBrowserAndServer(); |
354 did_complete_action = true; | 354 did_complete_action = true; |
355 } else if (LowerCaseEqualsASCII(action, "testaboutchrome")) { | 355 } else if (LowerCaseEqualsASCII(action, "testaboutchrome")) { |
356 did_complete_action = TestAboutChrome(); | 356 did_complete_action = TestAboutChrome(); |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 } | 1008 } |
1009 } | 1009 } |
1010 | 1010 |
1011 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { | 1011 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { |
1012 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 1012 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
1013 if (parsed_command_line.HasSwitch(kReproSwitch)) | 1013 if (parsed_command_line.HasSwitch(kReproSwitch)) |
1014 RunReproduction(); | 1014 RunReproduction(); |
1015 else | 1015 else |
1016 RunAutomatedUITest(); | 1016 RunAutomatedUITest(); |
1017 } | 1017 } |
OLD | NEW |