diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 22:27:13 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 22:27:13 +0000 |
commit | dceb0b66356caee49724006936803ad5cb09cb0f (patch) | |
tree | 96a1ec50fa40197f0a631a1e9f6ace1cda1fba22 | |
parent | 8b65ba9961e94706d8b0833638d0ef99b95b3b43 (diff) | |
download | chromium_src-dceb0b66356caee49724006936803ad5cb09cb0f.zip chromium_src-dceb0b66356caee49724006936803ad5cb09cb0f.tar.gz chromium_src-dceb0b66356caee49724006936803ad5cb09cb0f.tar.bz2 |
GTTF: Clean up UITestSuite and ProxyLauncher:
- move code from UITestSuite to ProxyLauncher
- remove lots of accessors inside ProxyLauncher
- drop support for running UI tests in single process mode
(it was broken anyway, and nothing uses it)
BUG=none
Review URL: http://codereview.chromium.org/7621072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97377 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/metrics/metrics_service_uitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/npapi_interactive_test.cc | 6 | ||||
-rw-r--r-- | chrome/browser/sessions/session_restore_uitest.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/tests/browser_uitest.cc | 8 | ||||
-rw-r--r-- | chrome/common/logging_chrome_uitest.cc | 33 | ||||
-rw-r--r-- | chrome/test/automation/proxy_launcher.cc | 38 | ||||
-rw-r--r-- | chrome/test/automation/proxy_launcher.h | 76 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 8 | ||||
-rw-r--r-- | chrome/test/ui/layout_plugin_uitest.cc | 3 | ||||
-rw-r--r-- | chrome/test/ui/npapi_uitest.cc | 42 | ||||
-rw-r--r-- | chrome/test/ui/ui_test_suite.cc | 32 | ||||
-rw-r--r-- | content/browser/renderer_host/resource_dispatcher_host_uitest.cc | 4 | ||||
-rw-r--r-- | content/worker/test/worker_uitest.cc | 3 |
13 files changed, 42 insertions, 220 deletions
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc index 9e979c6..db584d5 100644 --- a/chrome/browser/metrics/metrics_service_uitest.cc +++ b/chrome/browser/metrics/metrics_service_uitest.cc @@ -88,10 +88,6 @@ TEST_F(MetricsServiceTest, CloseRenderersNormally) { } TEST_F(MetricsServiceTest, DISABLED_CrashRenderers) { - // This doesn't make sense to test in single process mode. - if (ProxyLauncher::in_process_renderer()) - return; - OpenTabs(); { diff --git a/chrome/browser/npapi_interactive_test.cc b/chrome/browser/npapi_interactive_test.cc index 7d85b52..1582eaf4 100644 --- a/chrome/browser/npapi_interactive_test.cc +++ b/chrome/browser/npapi_interactive_test.cc @@ -20,9 +20,6 @@ static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi"); // Tests if a plugin executing a self deleting script in the context of // a synchronous mousemove works correctly TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { - if (ProxyLauncher::in_process_renderer()) - return; - show_window_ = true; const FilePath kTestDir(FILE_PATH_LITERAL("npapi")); const FilePath test_case( @@ -42,9 +39,6 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { // Flaky, http://crbug.com/60071. TEST_F(NPAPIVisiblePluginTester, FLAKY_GetURLRequest404Response) { - if (ProxyLauncher::in_process_renderer()) - return; - GURL url(URLRequestMockHTTPJob::GetMockUrl( FilePath(FILE_PATH_LITERAL( "npapi/plugin_url_request_404.html")))); diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc index 2daba5c..8428a6d 100644 --- a/chrome/browser/sessions/session_restore_uitest.cc +++ b/chrome/browser/sessions/session_restore_uitest.cc @@ -445,11 +445,6 @@ TEST_F(SessionRestoreUITest, TwoWindowsCloseOneRestoreOnlyOne) { // breaks NTP background image refreshing, so ThemeSource had to revert to // replacing the existing data source. TEST_F(SessionRestoreUITest, FLAKY_ShareProcessesOnRestore) { - if (ProxyLauncher::in_process_renderer()) { - // No point in running this test in single process mode. - return; - } - scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser_proxy.get() != NULL); int tab_count; diff --git a/chrome/browser/ui/tests/browser_uitest.cc b/chrome/browser/ui/tests/browser_uitest.cc index 2649a9e..35a7d8f 100644 --- a/chrome/browser/ui/tests/browser_uitest.cc +++ b/chrome/browser/ui/tests/browser_uitest.cc @@ -82,10 +82,6 @@ TEST_F(BrowserTest, PosixSessionEnd) { // set window.opener to null properly. #ifdef CHROME_V8 TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { - // This test only works in multi-process mode - if (ProxyLauncher::in_process_renderer()) - return; - net::TestServer test_server(net::TestServer::TYPE_HTTP, FilePath(FILE_PATH_LITERAL("chrome/test/data"))); ASSERT_TRUE(test_server.Start()); @@ -136,10 +132,6 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { // Tests that non-Gmail-like script redirects (i.e., non-null window.opener) or // a same-page-redirect) will not fork a new process. TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { - // This test only works in multi-process mode - if (ProxyLauncher::in_process_renderer()) - return; - net::TestServer test_server(net::TestServer::TYPE_HTTP, FilePath(FILE_PATH_LITERAL("chrome/test/data"))); ASSERT_TRUE(test_server.Start()); diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc index f2b0589..6b72ea0 100644 --- a/chrome/common/logging_chrome_uitest.cc +++ b/chrome/common/logging_chrome_uitest.cc @@ -107,14 +107,8 @@ class AssertionTest : public UITest { #define Assertion DISABLED_Assertion #endif TEST_F(AssertionTest, Assertion) { - if (ProxyLauncher::in_process_renderer()) { - // in process mode doesn't do the crashing. - expected_errors_ = 0; - expected_crashes_ = 0; - } else { - expected_errors_ = EXPECTED_ASSERT_ERRORS; - expected_crashes_ = EXPECTED_ASSERT_CRASHES; - } + expected_errors_ = EXPECTED_ASSERT_ERRORS; + expected_crashes_ = EXPECTED_ASSERT_CRASHES; } #endif // !defined(NDEBUG) @@ -142,14 +136,8 @@ class CheckFalseTest : public UITest { #endif // Launch the app in assertion test mode, then close the app. TEST_F(CheckFalseTest, CheckFails) { - if (ProxyLauncher::in_process_renderer()) { - // in process mode doesn't do the crashing. - expected_errors_ = 0; - expected_crashes_ = 0; - } else { - expected_errors_ = EXPECTED_ASSERT_ERRORS; - expected_crashes_ = EXPECTED_ASSERT_CRASHES; - } + expected_errors_ = EXPECTED_ASSERT_ERRORS; + expected_crashes_ = EXPECTED_ASSERT_CRASHES; } #endif // !defined(OFFICIAL_BUILD) @@ -180,13 +168,8 @@ class RendererCrashTest : public UITest { #endif // Launch the app in renderer crash test mode, then close the app. TEST_F(RendererCrashTest, Crash) { - if (ProxyLauncher::in_process_renderer()) { - // in process mode doesn't do the crashing. - expected_crashes_ = 0; - } else { - scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); - ASSERT_TRUE(browser.get()); - ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); - expected_crashes_ = EXPECTED_CRASH_CRASHES; - } + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + ASSERT_TRUE(browser.get()); + ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); + expected_crashes_ = EXPECTED_CRASH_CRASHES; } diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index c8d16a6..ed6491f 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -70,21 +70,26 @@ const char ProxyLauncher::kDefaultInterfaceId[] = "/var/tmp/ChromeTestingInterface"; #endif -bool ProxyLauncher::in_process_renderer_ = false; -bool ProxyLauncher::no_sandbox_ = false; -bool ProxyLauncher::full_memory_dump_ = false; -bool ProxyLauncher::show_error_dialogs_ = false; -bool ProxyLauncher::dump_histograms_on_exit_ = false; -bool ProxyLauncher::enable_dcheck_ = false; -bool ProxyLauncher::silent_dump_on_dcheck_ = false; -bool ProxyLauncher::disable_breakpad_ = false; -std::string ProxyLauncher::js_flags_ = ""; -std::string ProxyLauncher::log_level_ = ""; - ProxyLauncher::ProxyLauncher() : process_(base::kNullProcessHandle), process_id_(-1), - shutdown_type_(WINDOW_CLOSE) { + shutdown_type_(WINDOW_CLOSE), + no_sandbox_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kNoSandbox)), + full_memory_dump_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kFullMemoryCrashReport)), + dump_histograms_on_exit_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDumpHistogramsOnExit)), + enable_dcheck_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableDCHECK)), + silent_dump_on_dcheck_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kSilentDumpOnDCHECK)), + disable_breakpad_(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableBreakpad)), + js_flags_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kJavaScriptFlags)), + log_level_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kLoggingLevel)) { } ProxyLauncher::~ProxyLauncher() {} @@ -146,10 +151,9 @@ void ProxyLauncher::CloseBrowserAndServer() { // Suppress spammy failures that seem to be occurring when running // the UI tests in single-process mode. // TODO(jhughes): figure out why this is necessary at all, and fix it - if (!in_process_renderer_) - AssertAppNotRunning( - StringPrintf("Unable to quit all browser processes. Original PID %d", - process_id_)); + AssertAppNotRunning( + StringPrintf("Unable to quit all browser processes. Original PID %d", + process_id_)); DisconnectFromRunningBrowser(); } @@ -389,8 +393,6 @@ void ProxyLauncher::PrepareTestCommandline(CommandLine* command_line, switches::kEnableErrorDialogs)) { command_line->AppendSwitch(switches::kNoErrorDialogs); } - if (in_process_renderer_) - command_line->AppendSwitch(switches::kSingleProcess); if (no_sandbox_) command_line->AppendSwitch(switches::kNoSandbox); if (full_memory_dump_) diff --git a/chrome/test/automation/proxy_launcher.h b/chrome/test/automation/proxy_launcher.h index 12beeb0..0e497b7 100644 --- a/chrome/test/automation/proxy_launcher.h +++ b/chrome/test/automation/proxy_launcher.h @@ -141,61 +141,6 @@ class ProxyLauncher { shutdown_type_ = value; } - // Get/Set a flag to run the renderer in-process when running the tests. - static bool in_process_renderer() { return in_process_renderer_; } - static void set_in_process_renderer(bool value) { - in_process_renderer_ = value; - } - - // Get/Set a flag to run the renderer outside the sandbox when running tests. - static bool no_sandbox() { return no_sandbox_; } - static void set_no_sandbox(bool value) { - no_sandbox_ = value; - } - - // Get/Set a flag to run with DCHECKs enabled in release. - static bool enable_dcheck() { return enable_dcheck_; } - static void set_enable_dcheck(bool value) { - enable_dcheck_ = value; - } - - // Get/Set a flag to dump the process memory without crashing on DCHECKs. - static bool silent_dump_on_dcheck() { return silent_dump_on_dcheck_; } - static void set_silent_dump_on_dcheck(bool value) { - silent_dump_on_dcheck_ = value; - } - - // Get/Set a flag to disable breakpad handling. - static bool disable_breakpad() { return disable_breakpad_; } - static void set_disable_breakpad(bool value) { - disable_breakpad_ = value; - } - - static bool show_error_dialogs() { return show_error_dialogs_; } - static void set_show_error_dialogs(bool value) { - show_error_dialogs_ = value; - } - - static bool full_memory_dump() { return full_memory_dump_; } - static void set_full_memory_dump(bool value) { - full_memory_dump_ = value; - } - - static bool dump_histograms_on_exit() { return dump_histograms_on_exit_; } - static void set_dump_histograms_on_exit(bool value) { - dump_histograms_on_exit_ = value; - } - - static const std::string& js_flags() { return js_flags_; } - static void set_js_flags(const std::string& value) { - js_flags_ = value; - } - - static const std::string& log_level() { return log_level_; } - static void set_log_level(const std::string& value) { - log_level_ = value; - } - protected: // Creates an automation proxy. virtual AutomationProxy* CreateAutomationProxy( @@ -245,35 +190,32 @@ class ProxyLauncher { // The method for shutting down the browser. Used in ShutdownTest. ShutdownType shutdown_type_; - // True if we're in single process mode. - static bool in_process_renderer_; - // If true, runs the renderer outside the sandbox. - static bool no_sandbox_; + bool no_sandbox_; // If true, write full memory dump during crash. - static bool full_memory_dump_; + bool full_memory_dump_; // If true, a user is paying attention to the test, so show error dialogs. - static bool show_error_dialogs_; + bool show_error_dialogs_; // Include histograms in log on exit. - static bool dump_histograms_on_exit_; + bool dump_histograms_on_exit_; // Enable dchecks in release mode. - static bool enable_dcheck_; + bool enable_dcheck_; // Dump process memory on dcheck without crashing. - static bool silent_dump_on_dcheck_; + bool silent_dump_on_dcheck_; // Disable breakpad on the browser. - static bool disable_breakpad_; + bool disable_breakpad_; // Flags passed to the JS engine. - static std::string js_flags_; + std::string js_flags_; // Logging level. - static std::string log_level_; + std::string log_level_; DISALLOW_COPY_AND_ASSIGN(ProxyLauncher); }; diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index d0404ed..21a6147 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -364,11 +364,9 @@ class PageLoadTest : public UITest { test_page_url, log_file, NULL, g_continuous_load, false); } } else { - // Don't run if single process mode. - // Also don't run if running as a standalone program which is for - // distributed testing, to avoid mistakenly hitting web sites with many - // instances. - if (ProxyLauncher::in_process_renderer() || g_stand_alone) + // Don't run if running as a standalone program which is for distributed + // testing, to avoid mistakenly hitting web sites with many instances. + if (g_stand_alone) return; // For usage 1 NavigationMetrics metrics; diff --git a/chrome/test/ui/layout_plugin_uitest.cc b/chrome/test/ui/layout_plugin_uitest.cc index 0fc45b0..95f2e17 100644 --- a/chrome/test/ui/layout_plugin_uitest.cc +++ b/chrome/test/ui/layout_plugin_uitest.cc @@ -70,9 +70,6 @@ TEST_F(LayoutPluginTester, FLAKY_SelfDeletePluginInvoke) { } TEST_F(LayoutPluginTester, NPObjectReleasedOnDestruction) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("npobject_released_on_destruction.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); diff --git a/chrome/test/ui/npapi_uitest.cc b/chrome/test/ui/npapi_uitest.cc index 2bedc43..2ebf2b6 100644 --- a/chrome/test/ui/npapi_uitest.cc +++ b/chrome/test/ui/npapi_uitest.cc @@ -138,9 +138,6 @@ TEST_F(NPAPITesterBase, NPObjectProxy) { // http://crbug.com/44960 TEST_F(NPAPIVisiblePluginTester, FLAKY_SelfDeletePluginInvokeInSynchronousPaint) { - if (ProxyLauncher::in_process_renderer()) - return; - show_window_ = true; const FilePath test_case( FILE_PATH_LITERAL("execute_script_delete_in_paint.html")); @@ -153,9 +150,6 @@ TEST_F(NPAPIVisiblePluginTester, #endif TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNewStream) { - if (ProxyLauncher::in_process_renderer()) - return; - show_window_ = true; const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_stream.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -215,9 +209,6 @@ TEST_F(NPAPIVisiblePluginTester, AlertInWindowMessage) { } TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) { - if (ProxyLauncher::in_process_renderer()) - return; - show_window_ = true; const FilePath test_case(FILE_PATH_LITERAL("npobject_lifetime_test.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -237,9 +228,6 @@ TEST_F(NPAPIVisiblePluginTester, NewFails) { } TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("execute_script_delete_in_npn_evaluate.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -250,9 +238,6 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) { } TEST_F(NPAPIVisiblePluginTester, SelfDeleteCreatePluginInNPNEvaluate) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("npn_plugin_delete_create_in_evaluate.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -274,9 +259,6 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeleteCreatePluginInNPNEvaluate) { #endif TEST_F(NPAPIVisiblePluginTester, MAYBE_OpenPopupWindowWithPlugin) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("get_javascript_open_popup_with_plugin.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -288,9 +270,6 @@ TEST_F(NPAPIVisiblePluginTester, MAYBE_OpenPopupWindowWithPlugin) { // Test checking the privacy mode is off. TEST_F(NPAPITesterBase, PrivateDisabled) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case(FILE_PATH_LITERAL("private.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); @@ -316,9 +295,6 @@ TEST_F(NPAPITesterBase, PluginThreadAsyncCall) { // Test checking the privacy mode is on. TEST_F(NPAPIIncognitoTester, PrivateEnabled) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case(FILE_PATH_LITERAL("private.html")); GURL url = ui_test_utils::GetFileUrlWithQuery( ui_test_utils::GetTestFilePath(FilePath(kTestDir), test_case), "private"); @@ -331,9 +307,6 @@ TEST_F(NPAPIIncognitoTester, PrivateEnabled) { // Test a browser hang due to special case of multiple // plugin instances indulged in sync calls across renderer. TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("multiple_instances_sync_calls.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -344,9 +317,6 @@ TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) { #endif TEST_F(NPAPIVisiblePluginTester, GetURLRequestFailWrite) { - if (ProxyLauncher::in_process_renderer()) - return; - GURL url(URLRequestMockHTTPJob::GetMockUrl( FilePath(FILE_PATH_LITERAL( "npapi/plugin_url_request_fail_write.html")))); @@ -359,9 +329,6 @@ TEST_F(NPAPIVisiblePluginTester, GetURLRequestFailWrite) { #if defined(OS_WIN) TEST_F(NPAPITesterBase, EnsureScriptingWorksInDestroy) { - if (ProxyLauncher::in_process_renderer()) - return; - const FilePath test_case( FILE_PATH_LITERAL("ensure_scripting_works_in_destroy.html")); GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); @@ -374,9 +341,6 @@ TEST_F(NPAPITesterBase, EnsureScriptingWorksInDestroy) { // This test uses a Windows Event to signal to the plugin that it should crash // on NP_Initialize. TEST_F(NPAPITesterBase, NoHangIfInitCrashes) { - if (ProxyLauncher::in_process_renderer()) - return; - // Only Windows implements the crash service for now. #if defined(OS_WIN) expected_crashes_ = 1; @@ -396,9 +360,6 @@ TEST_F(NPAPITesterBase, NoHangIfInitCrashes) { #endif TEST_F(NPAPIVisiblePluginTester, PluginReferrerTest) { - if (ProxyLauncher::in_process_renderer()) - return; - GURL url(URLRequestMockHTTPJob::GetMockUrl( FilePath(FILE_PATH_LITERAL( "npapi/plugin_url_request_referrer_test.html")))); @@ -411,9 +372,6 @@ TEST_F(NPAPIVisiblePluginTester, PluginReferrerTest) { #if defined(OS_MACOSX) TEST_F(NPAPIVisiblePluginTester, PluginConvertPointTest) { - if (ProxyLauncher::in_process_renderer()) - return; - scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser.get()); scoped_refptr<WindowProxy> window(browser->GetWindow()); diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc index 0f8b9a9..917b500 100644 --- a/chrome/test/ui/ui_test_suite.cc +++ b/chrome/test/ui/ui_test_suite.cc @@ -11,13 +11,10 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/string_number_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/env_vars.h" -#include "chrome/test/automation/proxy_launcher.h" -UITestSuite::UITestSuite(int argc, char** argv) - : ChromeTestSuite(argc, argv) { +UITestSuite::UITestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) { #if defined(OS_WIN) crash_service_ = NULL; #endif @@ -25,32 +22,6 @@ UITestSuite::UITestSuite(int argc, char** argv) void UITestSuite::Initialize() { ChromeTestSuite::Initialize(); - - const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); - ProxyLauncher::set_in_process_renderer( - parsed_command_line.HasSwitch(switches::kSingleProcess)); - ProxyLauncher::set_no_sandbox( - parsed_command_line.HasSwitch(switches::kNoSandbox)); - ProxyLauncher::set_full_memory_dump( - parsed_command_line.HasSwitch(switches::kFullMemoryCrashReport)); - ProxyLauncher::set_dump_histograms_on_exit( - parsed_command_line.HasSwitch(switches::kDumpHistogramsOnExit)); - ProxyLauncher::set_enable_dcheck( - parsed_command_line.HasSwitch(switches::kEnableDCHECK)); - ProxyLauncher::set_silent_dump_on_dcheck( - parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK)); - ProxyLauncher::set_disable_breakpad( - parsed_command_line.HasSwitch(switches::kDisableBreakpad)); - - std::string js_flags = - parsed_command_line.GetSwitchValueASCII(switches::kJavaScriptFlags); - if (!js_flags.empty()) - ProxyLauncher::set_js_flags(js_flags); - std::string log_level = - parsed_command_line.GetSwitchValueASCII(switches::kLoggingLevel); - if (!log_level.empty()) - ProxyLauncher::set_log_level(log_level); - #if defined(OS_WIN) LoadCrashService(); #endif @@ -61,7 +32,6 @@ void UITestSuite::Shutdown() { if (crash_service_) base::KillProcess(crash_service_, 0, false); #endif - ChromeTestSuite::Shutdown(); } diff --git a/content/browser/renderer_host/resource_dispatcher_host_uitest.cc b/content/browser/renderer_host/resource_dispatcher_host_uitest.cc index 59ae9ee..a518112 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_uitest.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_uitest.cc @@ -275,10 +275,6 @@ TEST_F(ResourceDispatcherTest, MAYBE_CrossSiteNoUnloadOn204) { // complete and isn't conducive to quick turnarounds. As we don't currently // strip the app on the build bots, this is bad times. TEST_F(ResourceDispatcherTest, FAILS_CrossSiteAfterCrash) { - // This test only works in multi-process mode - if (ProxyLauncher::in_process_renderer()) - return; - scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser_proxy.get()); scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab()); diff --git a/content/worker/test/worker_uitest.cc b/content/worker/test/worker_uitest.cc index 3fe986e..2497821 100644 --- a/content/worker/test/worker_uitest.cc +++ b/content/worker/test/worker_uitest.cc @@ -87,8 +87,7 @@ class WorkerTest : public UILayoutTest { bool WaitForProcessCountToBe(int tabs, int workers) { // The 1 is for the browser process. - int number_of_processes = 1 + workers + - (ProxyLauncher::in_process_renderer() ? 0 : tabs); + int number_of_processes = 1 + workers + tabs; #if defined(OS_POSIX) && !defined(OS_MACOSX) // On Unix, we also have a zygote process and a sandbox host process. number_of_processes += 2; |