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

Unified Diff: chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc

Issue 69683002: Merge 233885 "Revert 231221 - "Remove enabled/disabled state fro..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
===================================================================
--- chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc (revision 234311)
+++ chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc (working copy)
@@ -10,6 +10,8 @@
using extensions_helper::AllProfilesHaveSameExtensions;
using extensions_helper::AllProfilesHaveSameExtensionsAsVerifier;
+using extensions_helper::DisableExtension;
+using extensions_helper::EnableExtension;
using extensions_helper::GetInstalledExtensions;
using extensions_helper::InstallExtension;
using extensions_helper::InstallExtensionsPendingForSync;
@@ -29,6 +31,9 @@
// Adds |num_extensions| new unique extensions to |profile|.
void AddExtensions(int profile, int num_extensions);
+ // Updates the enabled/disabled state for all extensions in |profile|.
+ void UpdateExtensions(int profile);
+
// Uninstalls all currently installed extensions from |profile|.
void RemoveExtensions(int profile);
@@ -46,6 +51,18 @@
}
}
+void ExtensionsSyncPerfTest::UpdateExtensions(int profile) {
+ std::vector<int> extensions = GetInstalledExtensions(GetProfile(profile));
+ for (std::vector<int>::iterator it = extensions.begin();
+ it != extensions.end(); ++it) {
+ if (IsExtensionEnabled(GetProfile(profile), *it)) {
+ DisableExtension(GetProfile(profile), *it);
+ } else {
+ EnableExtension(GetProfile(profile), *it);
+ }
+ }
+}
+
int ExtensionsSyncPerfTest::GetExtensionCount(int profile) {
return GetInstalledExtensions(GetProfile(profile)).size();
}
@@ -71,6 +88,12 @@
ASSERT_EQ(expected_extension_count, GetExtensionCount(1));
SyncTimingHelper::PrintResult("extensions", "add_extensions", dt);
+ // TCM ID - 7655397.
+ UpdateExtensions(0);
+ dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
+ ASSERT_EQ(expected_extension_count, GetExtensionCount(1));
+ SyncTimingHelper::PrintResult("extensions", "update_extensions", dt);
+
// TCM ID - 7567721.
RemoveExtensions(0);
dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));

Powered by Google App Engine
This is Rietveld 408576698