| Index: chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
|
| diff --git a/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
|
| index 4274adc7bff63e64629960841cf36db107b631f0..b91e65c32c7c7bea94d96909b017da434ece0ae3 100644
|
| --- a/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
|
| +++ b/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
|
| @@ -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 @@ class ExtensionsSyncPerfTest : public SyncTest {
|
| // 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::AddExtensions(int profile, int num_extensions) {
|
| }
|
| }
|
|
|
| +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 @@ IN_PROC_BROWSER_TEST_F(ExtensionsSyncPerfTest, P0) {
|
| 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));
|
|
|