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 // Create a service process that uses a Mock to respond to the browser in order | 5 // Create a service process that uses a Mock to respond to the browser in order |
6 // to test launching the browser using the cloud print policy check command | 6 // to test launching the browser using the cloud print policy check command |
7 // line switch. | 7 // line switch. |
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 312 |
313 protected: | 313 protected: |
314 MessageLoopForUI message_loop_; | 314 MessageLoopForUI message_loop_; |
315 content::TestBrowserThread ui_thread_; | 315 content::TestBrowserThread ui_thread_; |
316 base::Thread io_thread_; | 316 base::Thread io_thread_; |
317 | 317 |
318 std::string startup_channel_id_; | 318 std::string startup_channel_id_; |
319 scoped_ptr<IPC::ChannelProxy> startup_channel_; | 319 scoped_ptr<IPC::ChannelProxy> startup_channel_; |
320 | 320 |
321 #if defined(OS_MACOSX) | 321 #if defined(OS_MACOSX) |
322 ScopedTempDir temp_dir_; | 322 base::ScopedTempDir temp_dir_; |
323 FilePath executable_path_, bundle_path_; | 323 FilePath executable_path_, bundle_path_; |
324 scoped_ptr<MockLaunchd> mock_launchd_; | 324 scoped_ptr<MockLaunchd> mock_launchd_; |
325 scoped_ptr<Launchd::ScopedInstance> scoped_launchd_instance_; | 325 scoped_ptr<Launchd::ScopedInstance> scoped_launchd_instance_; |
326 #endif | 326 #endif |
327 | 327 |
328 private: | 328 private: |
329 class WindowedChannelConnectionObserver { | 329 class WindowedChannelConnectionObserver { |
330 public: | 330 public: |
331 WindowedChannelConnectionObserver() | 331 WindowedChannelConnectionObserver() |
332 : seen_(false), | 332 : seen_(false), |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // No expectations on run_loop being true here; that would be a race | 533 // No expectations on run_loop being true here; that would be a race |
534 // condition. | 534 // condition. |
535 if (run_loop) | 535 if (run_loop) |
536 MessageLoop::current()->Run(); | 536 MessageLoop::current()->Run(); |
537 | 537 |
538 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); | 538 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); |
539 | 539 |
540 ShutdownAndWaitForExitWithTimeout(handle); | 540 ShutdownAndWaitForExitWithTimeout(handle); |
541 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); | 541 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); |
542 } | 542 } |
OLD | NEW |