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

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

Issue 28224: Revert brett's code, for real this time. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« 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"
22 #include "chrome/common/win_util.h" 21 #include "chrome/common/win_util.h"
23 #include "chrome/test/automated_ui_tests/automated_ui_tests.h" 22 #include "chrome/test/automated_ui_tests/automated_ui_tests.h"
24 #include "chrome/test/automation/browser_proxy.h" 23 #include "chrome/test/automation/browser_proxy.h"
25 #include "chrome/test/automation/tab_proxy.h" 24 #include "chrome/test/automation/tab_proxy.h"
26 #include "chrome/test/automation/window_proxy.h" 25 #include "chrome/test/automation/window_proxy.h"
27 #include "chrome/test/ui/ui_test.h" 26 #include "chrome/test/ui/ui_test.h"
28 #include "chrome/views/view.h" 27 #include "chrome/views/view.h"
29 #include "googleurl/src/gurl.h" 28 #include "googleurl/src/gurl.h"
30 29
31 namespace { 30 namespace {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 return DoAction("PressEscapeKey") && return_value; 731 return DoAction("PressEscapeKey") && return_value;
733 } 732 }
734 733
735 bool AutomatedUITest::ForceCrash() { 734 bool AutomatedUITest::ForceCrash() {
736 scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow()); 735 scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow());
737 if (browser.get() == NULL) { 736 if (browser.get() == NULL) {
738 AddErrorAttribute("browser_window_not_found"); 737 AddErrorAttribute("browser_window_not_found");
739 return false; 738 return false;
740 } 739 }
741 scoped_ptr<TabProxy> tab(browser->GetActiveTab()); 740 scoped_ptr<TabProxy> tab(browser->GetActiveTab());
742 GURL test_url(chrome::kAboutCrashURL); 741 GURL test_url("about:crash");
743 bool did_timeout; 742 bool did_timeout;
744 tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout); 743 tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout);
745 if (!did_timeout) { 744 if (!did_timeout) {
746 AddInfoAttribute("expected_crash"); 745 AddInfoAttribute("expected_crash");
747 return false; 746 return false;
748 } 747 }
749 return true; 748 return true;
750 } 749 }
751 750
752 bool AutomatedUITest::DragActiveTab(bool drag_right, bool drag_out) { 751 bool AutomatedUITest::DragActiveTab(bool drag_right, bool drag_out) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 } 1010 }
1012 } 1011 }
1013 1012
1014 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 1013 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
1015 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 1014 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
1016 if (parsed_command_line.HasSwitch(kReproSwitch)) 1015 if (parsed_command_line.HasSwitch(kReproSwitch))
1017 RunReproduction(); 1016 RunReproduction();
1018 else 1017 else
1019 RunAutomatedUITest(); 1018 RunAutomatedUITest();
1020 } 1019 }
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