OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/signin/signin_supervised_user_import_handler.h
" | 5 #include "chrome/browser/ui/webui/signin/signin_supervised_user_import_handler.h
" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "chrome/browser/signin/fake_signin_manager_builder.h" | 9 #include "chrome/browser/signin/fake_signin_manager_builder.h" |
10 #include "chrome/browser/signin/signin_error_controller_factory.h" | 10 #include "chrome/browser/signin/signin_error_controller_factory.h" |
11 #include "chrome/browser/signin/signin_manager_factory.h" | 11 #include "chrome/browser/signin/signin_manager_factory.h" |
12 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 12 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
13 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" | 13 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" |
14 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
15 #include "chrome/test/base/browser_with_test_window_test.h" | 15 #include "chrome/test/base/browser_with_test_window_test.h" |
16 #include "chrome/test/base/testing_browser_process.h" | 16 #include "chrome/test/base/testing_browser_process.h" |
17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
18 #include "chrome/test/base/testing_profile_manager.h" | 18 #include "chrome/test/base/testing_profile_manager.h" |
19 #include "components/signin/core/browser/fake_auth_status_provider.h" | 19 #include "components/signin/core/browser/fake_auth_status_provider.h" |
| 20 #include "components/sync/api/attachments/attachment_id.h" |
| 21 #include "components/sync/api/fake_sync_change_processor.h" |
| 22 #include "components/sync/api/sync_error_factory_mock.h" |
| 23 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
| 24 #include "components/sync/protocol/sync.pb.h" |
20 #include "components/syncable_prefs/pref_service_syncable.h" | 25 #include "components/syncable_prefs/pref_service_syncable.h" |
21 #include "content/public/test/test_web_ui.h" | 26 #include "content/public/test/test_web_ui.h" |
22 #include "sync/api/attachments/attachment_id.h" | |
23 #include "sync/api/fake_sync_change_processor.h" | |
24 #include "sync/api/sync_error_factory_mock.h" | |
25 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" | |
26 #include "sync/protocol/sync.pb.h" | |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 const char kTestGaiaId[] = "test-gaia-id"; | 31 const char kTestGaiaId[] = "test-gaia-id"; |
32 const char kTestEmail[] = "foo@bar.com"; | 32 const char kTestEmail[] = "foo@bar.com"; |
33 | 33 |
34 const char kTestWebUIResponse[] = "cr.webUIResponse"; | 34 const char kTestWebUIResponse[] = "cr.webUIResponse"; |
35 const char kTestCallbackId[] = "test-callback-id"; | 35 const char kTestCallbackId[] = "test-callback-id"; |
36 | 36 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 std::string name; | 257 std::string name; |
258 ASSERT_TRUE(supervised_user->GetString("name", &name)); | 258 ASSERT_TRUE(supervised_user->GetString("name", &name)); |
259 EXPECT_EQ(kSupervisedUsername, name); | 259 EXPECT_EQ(kSupervisedUsername, name); |
260 std::string iconURL; | 260 std::string iconURL; |
261 ASSERT_TRUE(supervised_user->GetString("iconURL", &iconURL)); | 261 ASSERT_TRUE(supervised_user->GetString("iconURL", &iconURL)); |
262 EXPECT_EQ(kSupervisedUserAvatarUrl, iconURL); | 262 EXPECT_EQ(kSupervisedUserAvatarUrl, iconURL); |
263 bool onCurrentDevice; | 263 bool onCurrentDevice; |
264 ASSERT_TRUE(supervised_user->GetBoolean("onCurrentDevice", &onCurrentDevice)); | 264 ASSERT_TRUE(supervised_user->GetBoolean("onCurrentDevice", &onCurrentDevice)); |
265 ASSERT_FALSE(onCurrentDevice); | 265 ASSERT_FALSE(onCurrentDevice); |
266 } | 266 } |
OLD | NEW |