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

Side by Side Diff: chrome/test/live_sync/live_extensions_sync_test_base.cc

Issue 6282001: Disable background network access in sync integration tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/live_sync/live_sync_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/live_sync/live_extensions_sync_test_base.h" 5 #include "chrome/test/live_sync/live_extensions_sync_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void LiveExtensionsSyncTestBase::InstallExtension( 102 void LiveExtensionsSyncTestBase::InstallExtension(
103 Profile* profile, scoped_refptr<Extension> extension) { 103 Profile* profile, scoped_refptr<Extension> extension) {
104 CHECK(profile); 104 CHECK(profile);
105 CHECK(extension.get()); 105 CHECK(extension.get());
106 profile->GetExtensionService()->OnExtensionInstalled(extension); 106 profile->GetExtensionService()->OnExtensionInstalled(extension);
107 } 107 }
108 108
109 void LiveExtensionsSyncTestBase::InstallAllPendingExtensions( 109 void LiveExtensionsSyncTestBase::InstallAllPendingExtensions(
110 Profile* profile) { 110 Profile* profile) {
111 // TODO(akalin): Mock out the servers that the extensions
akalin 2011/01/13 04:40:07 Leave this TODO in, but also add that background n
Raghu Simha 2011/01/13 18:49:44 Done.
112 // auto-update mechanism talk to so as to more closely match what
113 // actually happens.
114
115 // We make a copy here since InstallExtension() removes the 111 // We make a copy here since InstallExtension() removes the
116 // extension from the extensions service's copy. 112 // extension from the extensions service's copy.
117 PendingExtensionMap pending_extensions = 113 PendingExtensionMap pending_extensions =
118 profile->GetExtensionService()->pending_extensions(); 114 profile->GetExtensionService()->pending_extensions();
119 for (PendingExtensionMap::const_iterator it = pending_extensions.begin(); 115 for (PendingExtensionMap::const_iterator it = pending_extensions.begin();
120 it != pending_extensions.end(); ++it) { 116 it != pending_extensions.end(); ++it) {
121 ExtensionIdMap::const_iterator it2 = extensions_by_id_.find(it->first); 117 ExtensionIdMap::const_iterator it2 = extensions_by_id_.find(it->first);
122 CHECK(it2 != extensions_by_id_.end()); 118 CHECK(it2 != extensions_by_id_.end());
123 InstallExtension(profile, it2->second); 119 InstallExtension(profile, it2->second);
124 } 120 }
125 } 121 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/live_sync/live_sync_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698