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

Side by Side Diff: chrome/browser/extensions/updater/extension_updater_unittest.cc

Issue 12211029: Sanity tweaks to the extension blacklist: check all extensions at once on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more test fixes Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 if (updates_start_running) { 1210 if (updates_start_running) {
1211 EXPECT_TRUE(updater.crx_install_is_running_); 1211 EXPECT_TRUE(updater.crx_install_is_running_);
1212 1212
1213 // The second install should not have run, because the first has not 1213 // The second install should not have run, because the first has not
1214 // sent a notification that it finished. 1214 // sent a notification that it finished.
1215 EXPECT_EQ(id1, service.extension_id()); 1215 EXPECT_EQ(id1, service.extension_id());
1216 EXPECT_EQ(url1, service.download_url()); 1216 EXPECT_EQ(url1, service.download_url());
1217 1217
1218 // Fake install notice. This should start the second installation, 1218 // Fake install notice. This should start the second installation,
1219 // which will be checked below. 1219 // which will be checked below.
1220 fake_crx1->NotifyCrxInstallComplete(NULL); 1220 fake_crx1->NotifyCrxInstallComplete(false);
1221 1221
1222 EXPECT_TRUE(updater.crx_install_is_running_); 1222 EXPECT_TRUE(updater.crx_install_is_running_);
1223 } 1223 }
1224 1224
1225 EXPECT_EQ(id2, service.extension_id()); 1225 EXPECT_EQ(id2, service.extension_id());
1226 EXPECT_EQ(url2, service.download_url()); 1226 EXPECT_EQ(url2, service.download_url());
1227 EXPECT_FALSE(service.install_path().empty()); 1227 EXPECT_FALSE(service.install_path().empty());
1228 1228
1229 // Make sure the correct crx contents were passed for the update call. 1229 // Make sure the correct crx contents were passed for the update call.
1230 EXPECT_EQ(extension_file_path2, service.install_path()); 1230 EXPECT_EQ(extension_file_path2, service.install_path());
1231 1231
1232 if (updates_start_running) { 1232 if (updates_start_running) {
1233 EXPECT_TRUE(updater.crx_install_is_running_); 1233 EXPECT_TRUE(updater.crx_install_is_running_);
1234 fake_crx2->NotifyCrxInstallComplete(NULL); 1234 fake_crx2->NotifyCrxInstallComplete(false);
1235 } 1235 }
1236 EXPECT_FALSE(updater.crx_install_is_running_); 1236 EXPECT_FALSE(updater.crx_install_is_running_);
1237 } 1237 }
1238 1238
1239 void TestGalleryRequestsWithBrand(bool use_organic_brand_code) { 1239 void TestGalleryRequestsWithBrand(bool use_organic_brand_code) {
1240 google_util::BrandForTesting brand_for_testing( 1240 google_util::BrandForTesting brand_for_testing(
1241 use_organic_brand_code ? "GGLS" : "TEST"); 1241 use_organic_brand_code ? "GGLS" : "TEST");
1242 1242
1243 // We want to test a variety of combinations of expected ping conditions for 1243 // We want to test a variety of combinations of expected ping conditions for
1244 // rollcall and active pings. 1244 // rollcall and active pings.
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 // -prodversionmin (shouldn't update if browser version too old) 1694 // -prodversionmin (shouldn't update if browser version too old)
1695 // -manifests & updates arriving out of order / interleaved 1695 // -manifests & updates arriving out of order / interleaved
1696 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 1696 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
1697 // -An extension gets uninstalled while updates are in progress (so it doesn't 1697 // -An extension gets uninstalled while updates are in progress (so it doesn't
1698 // "come back from the dead") 1698 // "come back from the dead")
1699 // -An extension gets manually updated to v3 while we're downloading v2 (ie 1699 // -An extension gets manually updated to v3 while we're downloading v2 (ie
1700 // you don't get downgraded accidentally) 1700 // you don't get downgraded accidentally)
1701 // -An update manifest mentions multiple updates 1701 // -An update manifest mentions multiple updates
1702 1702
1703 } // namespace extensions 1703 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698