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

Side by Side Diff: chrome/test/reliability/automated_ui_tests.cc

Issue 10828245: Final set of conversions of automation calls to the JSON interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } else if (LowerCaseEqualsASCII(action, "presstabkey")) { 441 } else if (LowerCaseEqualsASCII(action, "presstabkey")) {
442 did_complete_action = PressTabKey(); 442 did_complete_action = PressTabKey();
443 } else if (LowerCaseEqualsASCII(action, "reload")) { 443 } else if (LowerCaseEqualsASCII(action, "reload")) {
444 did_complete_action = ReloadPage(); 444 did_complete_action = ReloadPage();
445 } else if (LowerCaseEqualsASCII(action, "restoretab")) { 445 } else if (LowerCaseEqualsASCII(action, "restoretab")) {
446 did_complete_action = RestoreTab(); 446 did_complete_action = RestoreTab();
447 } else if (LowerCaseEqualsASCII(action, "selectnexttab")) { 447 } else if (LowerCaseEqualsASCII(action, "selectnexttab")) {
448 did_complete_action = SelectNextTab(); 448 did_complete_action = SelectNextTab();
449 } else if (LowerCaseEqualsASCII(action, "selectprevtab")) { 449 } else if (LowerCaseEqualsASCII(action, "selectprevtab")) {
450 did_complete_action = SelectPreviousTab(); 450 did_complete_action = SelectPreviousTab();
451 } else if (LowerCaseEqualsASCII(action, "showbookmarks")) {
452 did_complete_action = ShowBookmarkBar();
453 } else if (LowerCaseEqualsASCII(action, "setup")) { 451 } else if (LowerCaseEqualsASCII(action, "setup")) {
454 AutomatedUITestBase::SetUp(); 452 AutomatedUITestBase::SetUp();
455 did_complete_action = true; 453 did_complete_action = true;
456 } else if (LowerCaseEqualsASCII(action, "sleep")) { 454 } else if (LowerCaseEqualsASCII(action, "sleep")) {
457 // This is for debugging, it probably shouldn't be used real tests. 455 // This is for debugging, it probably shouldn't be used real tests.
458 base::PlatformThread::Sleep( 456 base::PlatformThread::Sleep(
459 base::TimeDelta::FromMilliseconds(kDebuggingTimeoutMsec)); 457 base::TimeDelta::FromMilliseconds(kDebuggingTimeoutMsec));
460 did_complete_action = true; 458 did_complete_action = true;
461 } else if (LowerCaseEqualsASCII(action, "star")) { 459 } else if (LowerCaseEqualsASCII(action, "star")) {
462 did_complete_action = StarPage(); 460 did_complete_action = StarPage();
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 824 }
827 } 825 }
828 826
829 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 827 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
830 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 828 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
831 if (parsed_command_line.HasSwitch(kReproSwitch)) 829 if (parsed_command_line.HasSwitch(kReproSwitch))
832 RunReproduction(); 830 RunReproduction();
833 else 831 else
834 RunAutomatedUITest(); 832 RunAutomatedUITest();
835 } 833 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698