Commit e3ab8d7b authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Clean up SingleClientExtensionsSyncTest

Remove redundant call to TriggerSyncForModelTypes() after FakeServer has
been extended to issue invalidations, just like the real server does.

Bug: None
Change-Id: Iab3fd66c81c3967fadc5db1209953916c043da6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886864
Auto-Submit: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710374}
parent 37c2e5c2
......@@ -75,7 +75,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, UninstallWinsConflicts) {
// Start with an extension installed, and setup sync.
InstallExtensionForAllProfiles(0);
ASSERT_TRUE(SetupSync());
EXPECT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
// Simulate a delete at the server.
std::vector<sync_pb::SyncEntity> server_extensions =
......@@ -89,21 +89,19 @@ IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, UninstallWinsConflicts) {
// Modify the extension in the local profile to cause a conflict.
DisableExtension(GetProfile(0), 0);
EXPECT_EQ(1u, GetInstalledExtensions(GetProfile(0)).size());
// Trigger sync, and expect the extension to remain uninstalled at the server
// and get uninstalled locally.
const syncer::ModelTypeSet kExtensionsType(syncer::EXTENSIONS);
TriggerSyncForModelTypes(0, kExtensionsType);
server_extensions =
GetFakeServer()->GetSyncEntitiesByModelType(syncer::EXTENSIONS);
EXPECT_EQ(0ul, server_extensions.size());
ASSERT_EQ(1u, GetInstalledExtensions(GetProfile(0)).size());
// Expect the extension to get uninstalled locally.
AwaitMatchStatusChangeChecker checker(
base::Bind(&ExtensionCountCheck, GetProfile(0), 0u),
"Waiting for profile to have no extensions");
EXPECT_TRUE(checker.Wait());
EXPECT_TRUE(GetInstalledExtensions(GetProfile(0)).empty());
// Expect the extension to remain uninstalled at the server.
server_extensions =
GetFakeServer()->GetSyncEntitiesByModelType(syncer::EXTENSIONS);
EXPECT_EQ(0ul, server_extensions.size());
}
} // namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment