Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698