OLD | NEW |
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/common/service_process_util.h" | 5 #include "chrome/common/service_process_util.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 base::CommandLine::StringVector argv = base::SplitString( | 157 base::CommandLine::StringVector argv = base::SplitString( |
158 exec_value, base::CommandLine::StringType(1, ' '), | 158 exec_value, base::CommandLine::StringType(1, ' '), |
159 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 159 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
160 ASSERT_GE(argv.size(), 2U) | 160 ASSERT_GE(argv.size(), 2U) |
161 << "Expected at least one command-line option in: " << exec_value; | 161 << "Expected at least one command-line option in: " << exec_value; |
162 autorun_command_line.reset(new base::CommandLine(argv)); | 162 autorun_command_line.reset(new base::CommandLine(argv)); |
163 #endif // defined(OS_WIN) | 163 #endif // defined(OS_WIN) |
164 if (autorun_command_line.get()) { | 164 if (autorun_command_line.get()) { |
165 EXPECT_EQ(autorun_command_line->GetSwitchValueASCII(switches::kProcessType), | 165 EXPECT_EQ(autorun_command_line->GetSwitchValueASCII(switches::kProcessType), |
166 std::string(switches::kServiceProcess)); | 166 std::string(switches::kCloudPrintServiceProcess)); |
167 } | 167 } |
168 ASSERT_TRUE(state.RemoveFromAutoRun()); | 168 ASSERT_TRUE(state.RemoveFromAutoRun()); |
169 #if defined(OS_WIN) | 169 #if defined(OS_WIN) |
170 EXPECT_FALSE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, | 170 EXPECT_FALSE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, |
171 base::UTF8ToWide(value_name), | 171 base::UTF8ToWide(value_name), |
172 &value)); | 172 &value)); |
173 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 173 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
174 EXPECT_FALSE(AutoStart::GetAutostartFileValue( | 174 EXPECT_FALSE(AutoStart::GetAutostartFileValue( |
175 GetServiceProcessScopedName(base_desktop_name), "Exec", &exec_value)); | 175 GetServiceProcessScopedName(base_desktop_name), "Exec", &exec_value)); |
176 #endif // defined(OS_WIN) | 176 #endif // defined(OS_WIN) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 message_loop.task_runner()->PostDelayedTask( | 242 message_loop.task_runner()->PostDelayedTask( |
243 FROM_HERE, run_loop.QuitWhenIdleClosure(), | 243 FROM_HERE, run_loop.QuitWhenIdleClosure(), |
244 TestTimeouts::action_max_timeout()); | 244 TestTimeouts::action_max_timeout()); |
245 EXPECT_FALSE(g_good_shutdown); | 245 EXPECT_FALSE(g_good_shutdown); |
246 run_loop.Run(); | 246 run_loop.Run(); |
247 EXPECT_TRUE(g_good_shutdown); | 247 EXPECT_TRUE(g_good_shutdown); |
248 return 0; | 248 return 0; |
249 } | 249 } |
250 | 250 |
251 #endif // !OS_MACOSX | 251 #endif // !OS_MACOSX |
OLD | NEW |