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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_settings_service_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_settings_service.h" 5 #include "chrome/browser/supervised_user/supervised_user_settings_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "components/prefs/testing_pref_store.h" 14 #include "components/prefs/testing_pref_store.h"
15 #include "components/sync/api/fake_sync_change_processor.h"
16 #include "components/sync/api/sync_change.h"
17 #include "components/sync/api/sync_change_processor_wrapper_for_test.h"
18 #include "components/sync/api/sync_error_factory_mock.h"
19 #include "components/sync/protocol/sync.pb.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 20 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "sync/api/fake_sync_change_processor.h"
17 #include "sync/api/sync_change.h"
18 #include "sync/api/sync_change_processor_wrapper_for_test.h"
19 #include "sync/api/sync_error_factory_mock.h"
20 #include "sync/protocol/sync.pb.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 namespace { 23 namespace {
24 24
25 class MockSyncErrorFactory : public syncer::SyncErrorFactory { 25 class MockSyncErrorFactory : public syncer::SyncErrorFactory {
26 public: 26 public:
27 explicit MockSyncErrorFactory(syncer::ModelType type); 27 explicit MockSyncErrorFactory(syncer::ModelType type);
28 ~MockSyncErrorFactory() override; 28 ~MockSyncErrorFactory() override;
29 29
30 // SyncErrorFactory implementation: 30 // SyncErrorFactory implementation:
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // The uploaded items should not show up as settings. 358 // The uploaded items should not show up as settings.
359 const base::Value* value = nullptr; 359 const base::Value* value = nullptr;
360 EXPECT_FALSE(settings_->GetWithoutPathExpansion(kAtomicItemName, &value)); 360 EXPECT_FALSE(settings_->GetWithoutPathExpansion(kAtomicItemName, &value));
361 EXPECT_FALSE(settings_->GetWithoutPathExpansion(kSplitItemName, &value)); 361 EXPECT_FALSE(settings_->GetWithoutPathExpansion(kSplitItemName, &value));
362 362
363 // Restarting sync should not create any new changes. 363 // Restarting sync should not create any new changes.
364 settings_service_.StopSyncing(syncer::SUPERVISED_USER_SETTINGS); 364 settings_service_.StopSyncing(syncer::SUPERVISED_USER_SETTINGS);
365 StartSyncing(sync_data); 365 StartSyncing(sync_data);
366 ASSERT_EQ(0u, sync_processor_->changes().size()); 366 ASSERT_EQ(0u, sync_processor_->changes().size());
367 } 367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698