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

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 10825109: Add default testing command line flags in UITestBase instead of ProxyLauncher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix define 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
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/webdriver/webdriver_automation.cc » ('j') | 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) 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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #endif 10 #endif
(...skipping 28 matching lines...) Expand all
39 #include "chrome/common/logging_chrome.h" 39 #include "chrome/common/logging_chrome.h"
40 #include "chrome/common/pref_names.h" 40 #include "chrome/common/pref_names.h"
41 #include "chrome/common/url_constants.h" 41 #include "chrome/common/url_constants.h"
42 #include "chrome/test/automation/automation_proxy.h" 42 #include "chrome/test/automation/automation_proxy.h"
43 #include "chrome/test/automation/browser_proxy.h" 43 #include "chrome/test/automation/browser_proxy.h"
44 #include "chrome/test/automation/proxy_launcher.h" 44 #include "chrome/test/automation/proxy_launcher.h"
45 #include "chrome/test/automation/tab_proxy.h" 45 #include "chrome/test/automation/tab_proxy.h"
46 #include "chrome/test/automation/window_proxy.h" 46 #include "chrome/test/automation/window_proxy.h"
47 #include "chrome/test/base/chrome_process_util.h" 47 #include "chrome/test/base/chrome_process_util.h"
48 #include "chrome/test/base/testing_profile.h" 48 #include "chrome/test/base/testing_profile.h"
49 #include "chrome/test/base/test_launcher_utils.h"
49 #include "chrome/test/base/test_switches.h" 50 #include "chrome/test/base/test_switches.h"
50 #include "content/common/debug_flags.h" 51 #include "content/common/debug_flags.h"
51 #include "googleurl/src/gurl.h" 52 #include "googleurl/src/gurl.h"
52 #include "net/base/net_util.h" 53 #include "net/base/net_util.h"
53 #include "ui/gl/gl_implementation.h" 54 #include "ui/gl/gl_implementation.h"
54 55
55 #if defined(OS_WIN) 56 #if defined(OS_WIN)
56 #include "base/win/windows_version.h" 57 #include "base/win/windows_version.h"
57 #endif 58 #endif
58 59
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 { clear_profile_, template_user_data_, setup_profile_callback, 169 { clear_profile_, template_user_data_, setup_profile_callback,
169 command, include_testing_id_, show_window_ }; 170 command, include_testing_id_, show_window_ };
170 return state; 171 return state;
171 } 172 }
172 173
173 void UITestBase::SetLaunchSwitches() { 174 void UITestBase::SetLaunchSwitches() {
174 // All flags added here should also be added in ExtraChromeFlags() in 175 // All flags added here should also be added in ExtraChromeFlags() in
175 // chrome/test/pyautolib/pyauto.py as well to take effect for all tests 176 // chrome/test/pyautolib/pyauto.py as well to take effect for all tests
176 // on chromeos. 177 // on chromeos.
177 178
179 // Propagate commandline settings from test_launcher_utils.
180 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_);
181
178 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger)) 182 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger))
179 launch_arguments_.AppendSwitch(switches::kWaitForDebugger); 183 launch_arguments_.AppendSwitch(switches::kWaitForDebugger);
180 184
181 // We need cookies on file:// for things like the page cycler. 185 // We need cookies on file:// for things like the page cycler.
182 if (enable_file_cookies_) 186 if (enable_file_cookies_)
183 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); 187 launch_arguments_.AppendSwitch(switches::kEnableFileCookies);
184 if (dom_automation_enabled_) 188 if (dom_automation_enabled_)
185 launch_arguments_.AppendSwitch(switches::kDomAutomationController); 189 launch_arguments_.AppendSwitch(switches::kDomAutomationController);
186 // Allow off-store extension installs. 190 // Allow off-store extension installs.
187 launch_arguments_.AppendSwitch(switches::kEnableEasyOffStoreExtensionInstall); 191 launch_arguments_.AppendSwitch(switches::kEnableEasyOffStoreExtensionInstall);
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 &session_end_completed)); 737 &session_end_completed));
734 ASSERT_TRUE(session_end_completed); 738 ASSERT_TRUE(session_end_completed);
735 739
736 // Make sure session restore says we didn't crash. 740 // Make sure session restore says we didn't crash.
737 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); 741 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences());
738 ASSERT_TRUE(profile_prefs.get()); 742 ASSERT_TRUE(profile_prefs.get());
739 ASSERT_TRUE(profile_prefs->GetBoolean(prefs::kSessionExitedCleanly, 743 ASSERT_TRUE(profile_prefs->GetBoolean(prefs::kSessionExitedCleanly,
740 &exited_cleanly)); 744 &exited_cleanly));
741 ASSERT_TRUE(exited_cleanly); 745 ASSERT_TRUE(exited_cleanly);
742 } 746 }
OLDNEW
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/webdriver/webdriver_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698