diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 00:31:41 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 00:31:41 +0000 |
commit | 990a104231e51bfce715487cb975385bd93974a1 (patch) | |
tree | ae723b8819479f29467f455bc902ae37f0f015b4 /chrome/test | |
parent | 440348fa438450f5a99349a0fe291409e77b84db (diff) | |
download | chromium_src-990a104231e51bfce715487cb975385bd93974a1.zip chromium_src-990a104231e51bfce715487cb975385bd93974a1.tar.gz chromium_src-990a104231e51bfce715487cb975385bd93974a1.tar.bz2 |
[Sync] Fix modification-while-iterating bug in extensions integration tests
BUG=None
TEST=Windows integration tests
Review URL: http://codereview.chromium.org/5000002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/live_sync/live_extensions_sync_test_base.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/test/live_sync/live_extensions_sync_test_base.cc b/chrome/test/live_sync/live_extensions_sync_test_base.cc index 154ef18..1eb040e 100644 --- a/chrome/test/live_sync/live_extensions_sync_test_base.cc +++ b/chrome/test/live_sync/live_extensions_sync_test_base.cc @@ -111,7 +111,10 @@ void LiveExtensionsSyncTestBase::InstallAllPendingExtensions( // TODO(akalin): Mock out the servers that the extensions // auto-update mechanism talk to so as to more closely match what // actually happens. - const PendingExtensionMap& pending_extensions = + + // We make a copy here since InstallExtension() removes the + // extension from the extensions service's copy. + PendingExtensionMap pending_extensions = profile->GetExtensionsService()->pending_extensions(); for (PendingExtensionMap::const_iterator it = pending_extensions.begin(); it != pending_extensions.end(); ++it) { |