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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/prefs/testing_pref_service.h" | |
14 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
15 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
16 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
17 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 16 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
18 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 17 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
19 #include "chrome/browser/service_process/service_process_control.h" | 18 #include "chrome/browser/service_process/service_process_control.h" |
20 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 19 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
21 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/common/cloud_print/cloud_print_proxy_info.h" | 21 #include "chrome/common/cloud_print/cloud_print_proxy_info.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
24 #include "chrome/common/service_messages.h" | 23 #include "chrome/common/service_messages.h" |
25 #include "chrome/test/base/testing_browser_process.h" | 24 #include "chrome/test/base/testing_browser_process.h" |
26 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
27 #include "chrome/test/base/testing_profile_manager.h" | 26 #include "chrome/test/base/testing_profile_manager.h" |
| 27 #include "components/prefs/testing_pref_service.h" |
28 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 28 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/test/test_browser_thread.h" | 30 #include "content/public/test/test_browser_thread.h" |
31 #include "testing/gmock/include/gmock/gmock.h" | 31 #include "testing/gmock/include/gmock/gmock.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
34 using ::testing::Assign; | 34 using ::testing::Assign; |
35 using ::testing::AtMost; | 35 using ::testing::AtMost; |
36 using ::testing::DeleteArg; | 36 using ::testing::DeleteArg; |
37 using ::testing::DoAll; | 37 using ::testing::DoAll; |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 prefs->RemoveManagedPref(prefs::kCloudPrintProxyEnabled); | 442 prefs->RemoveManagedPref(prefs::kCloudPrintProxyEnabled); |
443 EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail)); | 443 EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail)); |
444 | 444 |
445 service.GetMockServiceProcessControl()->SetWillBeEnabledExpectations(); | 445 service.GetMockServiceProcessControl()->SetWillBeEnabledExpectations(); |
446 service.EnableForUser(); | 446 service.EnableForUser(); |
447 | 447 |
448 EXPECT_EQ(MockServiceProcessControl::EnabledUserId(), | 448 EXPECT_EQ(MockServiceProcessControl::EnabledUserId(), |
449 prefs->GetString(prefs::kCloudPrintEmail)); | 449 prefs->GetString(prefs::kCloudPrintEmail)); |
450 } | 450 } |
OLD | NEW |