Index: chrome/test/live_sync/live_extensions_sync_test_base.cc |
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 154ef18e2a6ee158fac9f1e3d48bb7444aca4246..1eb040e5e9b5c261b45c7ac59ea528421625ad2e 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) { |