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

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

Issue 9349010: Move handling of debug urls like chrome://crash, chrome://gpuclean to content. These are for test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 return_value = return_value && 663 return_value = return_value &&
664 DoAction(kTestDialogPossibleActions[action_index]); 664 DoAction(kTestDialogPossibleActions[action_index]);
665 if (DidCrash(false)) 665 if (DidCrash(false))
666 break; 666 break;
667 } 667 }
668 return DoAction("PressEscapeKey") && return_value; 668 return DoAction("PressEscapeKey") && return_value;
669 } 669 }
670 670
671 bool AutomatedUITest::ForceCrash() { 671 bool AutomatedUITest::ForceCrash() {
672 scoped_refptr<TabProxy> tab(GetActiveTab()); 672 scoped_refptr<TabProxy> tab(GetActiveTab());
673 GURL test_url(chrome::kAboutCrashURL); 673 GURL test_url(chrome::kChromeUICrashURL);
674 AutomationMsg_NavigationResponseValues result = tab->NavigateToURL(test_url); 674 AutomationMsg_NavigationResponseValues result = tab->NavigateToURL(test_url);
675 if (result != AUTOMATION_MSG_NAVIGATION_SUCCESS) { 675 if (result != AUTOMATION_MSG_NAVIGATION_SUCCESS) {
676 AddErrorAttribute("navigation_failed"); 676 AddErrorAttribute("navigation_failed");
677 return false; 677 return false;
678 } 678 }
679 return true; 679 return true;
680 } 680 }
681 681
682 bool AutomatedUITest::SimulateKeyPressInActiveWindow(ui::KeyboardCode key, 682 bool AutomatedUITest::SimulateKeyPressInActiveWindow(ui::KeyboardCode key,
683 int flags) { 683 int flags) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 } 826 }
827 827
828 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 828 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
829 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 829 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
830 if (parsed_command_line.HasSwitch(kReproSwitch)) 830 if (parsed_command_line.HasSwitch(kReproSwitch))
831 RunReproduction(); 831 RunReproduction();
832 else 832 else
833 RunAutomatedUITest(); 833 RunAutomatedUITest();
834 } 834 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698