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)); |