| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/common/service_process_util.h" | 29 #include "chrome/common/service_process_util.h" |
| 30 #include "chrome/service/service_ipc_server.h" | 30 #include "chrome/service/service_ipc_server.h" |
| 31 #include "chrome/service/service_process.h" | 31 #include "chrome/service/service_process.h" |
| 32 #include "chrome/test/base/chrome_unit_test_suite.h" | 32 #include "chrome/test/base/chrome_unit_test_suite.h" |
| 33 #include "chrome/test/base/test_launcher_utils.h" | 33 #include "chrome/test/base/test_launcher_utils.h" |
| 34 #include "chrome/test/base/testing_browser_process.h" | 34 #include "chrome/test/base/testing_browser_process.h" |
| 35 #include "chrome/test/base/testing_io_thread_state.h" | 35 #include "chrome/test/base/testing_io_thread_state.h" |
| 36 #include "chrome/test/base/testing_pref_service_syncable.h" | 36 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 37 #include "chrome/test/base/testing_profile.h" | 37 #include "chrome/test/base/testing_profile.h" |
| 38 #include "chrome/test/base/testing_profile_manager.h" | 38 #include "chrome/test/base/testing_profile_manager.h" |
| 39 #include "chrome/test/base/ui_test_utils.h" | |
| 40 #include "components/keyed_service/core/keyed_service.h" | 39 #include "components/keyed_service/core/keyed_service.h" |
| 41 #include "content/public/browser/notification_service.h" | 40 #include "content/public/browser/notification_service.h" |
| 42 #include "content/public/common/content_paths.h" | 41 #include "content/public/common/content_paths.h" |
| 43 #include "content/public/test/test_browser_thread_bundle.h" | 42 #include "content/public/test/test_browser_thread_bundle.h" |
| 43 #include "content/public/test/test_utils.h" |
| 44 #include "ipc/ipc_descriptors.h" | 44 #include "ipc/ipc_descriptors.h" |
| 45 #include "ipc/ipc_multiprocess_test.h" | 45 #include "ipc/ipc_multiprocess_test.h" |
| 46 #include "ipc/ipc_switches.h" | 46 #include "ipc/ipc_switches.h" |
| 47 #include "testing/gmock/include/gmock/gmock.h" | 47 #include "testing/gmock/include/gmock/gmock.h" |
| 48 #include "testing/gtest/include/gtest/gtest.h" | 48 #include "testing/gtest/include/gtest/gtest.h" |
| 49 #include "testing/multiprocess_func_list.h" | 49 #include "testing/multiprocess_func_list.h" |
| 50 | 50 |
| 51 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
| 52 #include "chrome/common/mac/mock_launchd.h" | 52 #include "chrome/common/mac/mock_launchd.h" |
| 53 #endif | 53 #endif |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 // condition. | 619 // condition. |
| 620 if (should_run_loop) | 620 if (should_run_loop) |
| 621 run_loop.Run(); | 621 run_loop.Run(); |
| 622 | 622 |
| 623 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); | 623 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); |
| 624 | 624 |
| 625 ShutdownAndWaitForExitWithTimeout(handle); | 625 ShutdownAndWaitForExitWithTimeout(handle); |
| 626 content::RunAllPendingInMessageLoop(); | 626 content::RunAllPendingInMessageLoop(); |
| 627 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); | 627 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); |
| 628 } | 628 } |
| OLD | NEW |