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

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

Issue 28170: More URL constants replacement. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/renderer/render_view.cc ('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 <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"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/sys_info.h" 13 #include "base/sys_info.h"
14 #include "chrome/app/chrome_dll_resource.h" 14 #include "chrome/app/chrome_dll_resource.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/character_encoding.h" 16 #include "chrome/browser/character_encoding.h"
17 #include "chrome/browser/view_ids.h" 17 #include "chrome/browser/view_ids.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/env_vars.h" 19 #include "chrome/common/env_vars.h"
20 #include "chrome/common/libxml_utils.h" 20 #include "chrome/common/libxml_utils.h"
21 #include "chrome/common/url_constants.h"
21 #include "chrome/common/win_util.h" 22 #include "chrome/common/win_util.h"
22 #include "chrome/test/automated_ui_tests/automated_ui_tests.h" 23 #include "chrome/test/automated_ui_tests/automated_ui_tests.h"
23 #include "chrome/test/automation/browser_proxy.h" 24 #include "chrome/test/automation/browser_proxy.h"
24 #include "chrome/test/automation/tab_proxy.h" 25 #include "chrome/test/automation/tab_proxy.h"
25 #include "chrome/test/automation/window_proxy.h" 26 #include "chrome/test/automation/window_proxy.h"
26 #include "chrome/test/ui/ui_test.h" 27 #include "chrome/test/ui/ui_test.h"
27 #include "chrome/views/view.h" 28 #include "chrome/views/view.h"
28 #include "googleurl/src/gurl.h" 29 #include "googleurl/src/gurl.h"
29 30
30 namespace { 31 namespace {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 return DoAction("PressEscapeKey") && return_value; 732 return DoAction("PressEscapeKey") && return_value;
732 } 733 }
733 734
734 bool AutomatedUITest::ForceCrash() { 735 bool AutomatedUITest::ForceCrash() {
735 scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow()); 736 scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow());
736 if (browser.get() == NULL) { 737 if (browser.get() == NULL) {
737 AddErrorAttribute("browser_window_not_found"); 738 AddErrorAttribute("browser_window_not_found");
738 return false; 739 return false;
739 } 740 }
740 scoped_ptr<TabProxy> tab(browser->GetActiveTab()); 741 scoped_ptr<TabProxy> tab(browser->GetActiveTab());
741 GURL test_url("about:crash"); 742 GURL test_url(chrome::kAboutCrashURL);
742 bool did_timeout; 743 bool did_timeout;
743 tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout); 744 tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout);
744 if (!did_timeout) { 745 if (!did_timeout) {
745 AddInfoAttribute("expected_crash"); 746 AddInfoAttribute("expected_crash");
746 return false; 747 return false;
747 } 748 }
748 return true; 749 return true;
749 } 750 }
750 751
751 bool AutomatedUITest::DragActiveTab(bool drag_right, bool drag_out) { 752 bool AutomatedUITest::DragActiveTab(bool drag_right, bool drag_out) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 } 1011 }
1011 } 1012 }
1012 1013
1013 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 1014 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
1014 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 1015 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
1015 if (parsed_command_line.HasSwitch(kReproSwitch)) 1016 if (parsed_command_line.HasSwitch(kReproSwitch))
1016 RunReproduction(); 1017 RunReproduction();
1017 else 1018 else
1018 RunAutomatedUITest(); 1019 RunAutomatedUITest();
1019 } 1020 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698