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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/policy/profile_policy_connector_factory.h" 16 #include "chrome/browser/policy/profile_policy_connector_factory.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 18 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
19 #include "chrome/browser/sync/test/integration/passwords_helper.h" 19 #include "chrome/browser/sync/test/integration/passwords_helper.h"
20 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 20 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
21 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" 21 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
22 #include "chrome/browser/sync/test/integration/sync_test.h" 22 #include "chrome/browser/sync/test/integration/sync_test.h"
23 #include "components/bookmarks/browser/bookmark_node.h" 23 #include "components/bookmarks/browser/bookmark_node.h"
24 #include "components/policy/core/common/mock_configuration_policy_provider.h" 24 #include "components/policy/core/common/mock_configuration_policy_provider.h"
25 #include "components/policy/core/common/policy_map.h" 25 #include "components/policy/core/common/policy_map.h"
26 #include "components/policy/core/common/policy_types.h" 26 #include "components/policy/core/common/policy_types.h"
27 #include "components/sync/sessions/sync_session_snapshot.h"
27 #include "policy/policy_constants.h" 28 #include "policy/policy_constants.h"
28 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
29 #include "testing/gmock/include/gmock/gmock.h" 29 #include "testing/gmock/include/gmock/gmock.h"
30 #include "ui/base/layout.h" 30 #include "ui/base/layout.h"
31 31
32 using bookmarks::BookmarkNode; 32 using bookmarks::BookmarkNode;
33 using bookmarks_helper::AddFolder; 33 using bookmarks_helper::AddFolder;
34 using bookmarks_helper::AddURL; 34 using bookmarks_helper::AddURL;
35 using bookmarks_helper::AllModelsMatch; 35 using bookmarks_helper::AllModelsMatch;
36 using bookmarks_helper::AllModelsMatchVerifier; 36 using bookmarks_helper::AllModelsMatchVerifier;
37 using bookmarks_helper::AwaitAllModelsMatch; 37 using bookmarks_helper::AwaitAllModelsMatch;
38 using bookmarks_helper::CheckFaviconExpired; 38 using bookmarks_helper::CheckFaviconExpired;
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 // second client. 2342 // second client.
2343 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(syncer::BOOKMARKS)); 2343 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(syncer::BOOKMARKS));
2344 const std::string url_title_2 = "another happy little url"; 2344 const std::string url_title_2 = "another happy little url";
2345 const GURL url_2("https://example.com/second"); 2345 const GURL url_2("https://example.com/second");
2346 ASSERT_TRUE(AddURL(0, GetBookmarkBarNode(0), 0, url_title_2, url_2) != NULL); 2346 ASSERT_TRUE(AddURL(0, GetBookmarkBarNode(0), 0, url_title_2, url_2) != NULL);
2347 ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(syncer::BOOKMARKS)); 2347 ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(syncer::BOOKMARKS));
2348 ASSERT_TRUE(AwaitAllModelsMatch()); 2348 ASSERT_TRUE(AwaitAllModelsMatch());
2349 ASSERT_EQ(initial_count + 2, CountAllBookmarks(0)); 2349 ASSERT_EQ(initial_count + 2, CountAllBookmarks(0));
2350 ASSERT_EQ(initial_count + 2, CountAllBookmarks(1)); 2350 ASSERT_EQ(initial_count + 2, CountAllBookmarks(1));
2351 } 2351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698