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

Unified Diff: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc

Issue 982883003: Use fixed socket name instead of SecureSocketWithKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Mar 16 00:37:12 PDT 2015 Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/service_process/service_process_control_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
index fff3e3828b06e4e8dc200a55799233e8f79ad9cf..4f1db25c142094cedce390b8e6d20de5c92cf3de 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -216,6 +216,11 @@ int CloudPrintMockService_Main(SetExpectationsCallback set_expectations) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
content::RegisterPathProvider();
+ base::FilePath user_data_dir =
+ command_line->GetSwitchValuePath(switches::kUserDataDir);
+ CHECK(!user_data_dir.empty());
+ CHECK(test_launcher_utils::OverrideUserDataDir(user_data_dir));
+
#if defined(OS_MACOSX)
if (!command_line->HasSwitch(kTestExecutablePath))
return kMissingSwitch;
@@ -226,10 +231,6 @@ int CloudPrintMockService_Main(SetExpectationsCallback set_expectations) {
Launchd::ScopedInstance use_mock(&mock_launchd);
#endif
- base::FilePath user_data_dir =
- command_line->GetSwitchValuePath(switches::kUserDataDir);
- CHECK(!user_data_dir.empty());
- CHECK(test_launcher_utils::OverrideUserDataDir(user_data_dir));
ServiceProcessState* state(new ServiceProcessState);
bool service_process_state_initialized = state->Initialize();
@@ -390,19 +391,6 @@ void CloudPrintProxyPolicyStartupTest::SetUp() {
content::SetBrowserClientForTesting(browser_content_client_.get());
TestingBrowserProcess::CreateInstance();
-#if defined(OS_MACOSX)
- EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
- EXPECT_TRUE(MockLaunchd::MakeABundle(temp_dir_.path(),
- "CloudPrintProxyTest",
- &bundle_path_,
- &executable_path_));
- mock_launchd_.reset(new MockLaunchd(executable_path_,
- base::MessageLoopForUI::current(),
- true, false));
- scoped_launchd_instance_.reset(
- new Launchd::ScopedInstance(mock_launchd_.get()));
-#endif
-
// Ensure test does not use the standard profile directory. This is copied
// from InProcessBrowserTest::SetUp(). These tests require a more complex
// process startup so they are unable to just inherit from
@@ -420,6 +408,19 @@ void CloudPrintProxyPolicyStartupTest::SetUp() {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
}
ASSERT_TRUE(test_launcher_utils::OverrideUserDataDir(user_data_dir));
+
+#if defined(OS_MACOSX)
+ EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
+ EXPECT_TRUE(MockLaunchd::MakeABundle(temp_dir_.path(),
+ "CloudPrintProxyTest",
+ &bundle_path_,
+ &executable_path_));
+ mock_launchd_.reset(new MockLaunchd(executable_path_,
+ base::MessageLoopForUI::current(),
+ true, false));
+ scoped_launchd_instance_.reset(
+ new Launchd::ScopedInstance(mock_launchd_.get()));
+#endif
}
void CloudPrintProxyPolicyStartupTest::TearDown() {
« no previous file with comments | « no previous file | chrome/browser/service_process/service_process_control_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698