| 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 26 matching lines...) Expand all Loading... |
| 37 #include "ipc/ipc_multiprocess_test.h" | 37 #include "ipc/ipc_multiprocess_test.h" |
| 38 #include "ipc/ipc_switches.h" | 38 #include "ipc/ipc_switches.h" |
| 39 #include "testing/gmock/include/gmock/gmock.h" | 39 #include "testing/gmock/include/gmock/gmock.h" |
| 40 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
| 41 #include "testing/multiprocess_func_list.h" | 41 #include "testing/multiprocess_func_list.h" |
| 42 | 42 |
| 43 #if defined(OS_MACOSX) | 43 #if defined(OS_MACOSX) |
| 44 #include "chrome/common/mac/mock_launchd.h" | 44 #include "chrome/common/mac/mock_launchd.h" |
| 45 #endif | 45 #endif |
| 46 #if defined(OS_POSIX) | 46 #if defined(OS_POSIX) |
| 47 #include "base/global_descriptors_posix.h" | 47 #include "base/posix/global_descriptors.h" |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 using ::testing::AnyNumber; | 50 using ::testing::AnyNumber; |
| 51 using ::testing::Assign; | 51 using ::testing::Assign; |
| 52 using ::testing::AtLeast; | 52 using ::testing::AtLeast; |
| 53 using ::testing::DoAll; | 53 using ::testing::DoAll; |
| 54 using ::testing::Invoke; | 54 using ::testing::Invoke; |
| 55 using ::testing::Mock; | 55 using ::testing::Mock; |
| 56 using ::testing::Property; | 56 using ::testing::Property; |
| 57 using ::testing::Return; | 57 using ::testing::Return; |
| (...skipping 475 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 |