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/browser/ui/webui/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/prefs/pref_service.h" |
13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "chrome/browser/prefs/pref_service.h" | |
16 #include "chrome/browser/signin/fake_auth_status_provider.h" | 16 #include "chrome/browser/signin/fake_auth_status_provider.h" |
17 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
18 #include "chrome/browser/signin/signin_manager_fake.h" | 18 #include "chrome/browser/signin/signin_manager_fake.h" |
19 #include "chrome/browser/sync/profile_sync_service_factory.h" | 19 #include "chrome/browser/sync/profile_sync_service_factory.h" |
20 #include "chrome/browser/sync/profile_sync_service_mock.h" | 20 #include "chrome/browser/sync/profile_sync_service_mock.h" |
21 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 21 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
22 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 22 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
23 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 23 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
25 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
26 #include "chrome/test/base/testing_profile.h" | 26 #include "chrome/test/base/testing_profile.h" |
27 #include "content/public/browser/web_ui.h" | 27 #include "content/public/browser/web_ui.h" |
28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 #include "ui/base/l10n/l10n_util.h" |
30 #include "ui/base/layout.h" | 31 #include "ui/base/layout.h" |
31 #include "ui/base/l10n/l10n_util.h" | |
32 | 32 |
33 using ::testing::_; | 33 using ::testing::_; |
34 using ::testing::Mock; | 34 using ::testing::Mock; |
35 using ::testing::Return; | 35 using ::testing::Return; |
36 using ::testing::ReturnRef; | 36 using ::testing::ReturnRef; |
37 using ::testing::Values; | 37 using ::testing::Values; |
38 | 38 |
39 typedef GoogleServiceAuthError AuthError; | 39 typedef GoogleServiceAuthError AuthError; |
40 | 40 |
41 namespace { | 41 namespace { |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 dictionary, err, false, GoogleServiceAuthError::NONE, "", true, ""); | 1281 dictionary, err, false, GoogleServiceAuthError::NONE, "", true, ""); |
1282 handler_->CloseSyncSetup(); | 1282 handler_->CloseSyncSetup(); |
1283 EXPECT_EQ(NULL, | 1283 EXPECT_EQ(NULL, |
1284 LoginUIServiceFactory::GetForProfile( | 1284 LoginUIServiceFactory::GetForProfile( |
1285 profile_.get())->current_login_ui()); | 1285 profile_.get())->current_login_ui()); |
1286 } | 1286 } |
1287 | 1287 |
1288 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, | 1288 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, |
1289 SyncSetupHandlerTest, | 1289 SyncSetupHandlerTest, |
1290 Values(true, false)); | 1290 Values(true, false)); |
OLD | NEW |