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

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

Issue 8725013: Improve ExtensionBrowserTest. Part of moving ExtensionService to use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years 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 | « chrome/browser/extensions/extension_management_browsertest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (updates_start_running) { 863 if (updates_start_running) {
864 EXPECT_TRUE(updater.crx_install_is_running_); 864 EXPECT_TRUE(updater.crx_install_is_running_);
865 865
866 // The second install should not have run, because the first has not 866 // The second install should not have run, because the first has not
867 // sent a notification that it finished. 867 // sent a notification that it finished.
868 EXPECT_EQ(id1, service.extension_id()); 868 EXPECT_EQ(id1, service.extension_id());
869 EXPECT_EQ(url1, service.download_url()); 869 EXPECT_EQ(url1, service.download_url());
870 870
871 // Fake install notice. This should start the second installation, 871 // Fake install notice. This should start the second installation,
872 // which will be checked below. 872 // which will be checked below.
873 fake_crx1->NotifyCrxInstallComplete(); 873 fake_crx1->NotifyCrxInstallComplete(NULL);
874 874
875 EXPECT_TRUE(updater.crx_install_is_running_); 875 EXPECT_TRUE(updater.crx_install_is_running_);
876 } 876 }
877 877
878 EXPECT_EQ(id2, service.extension_id()); 878 EXPECT_EQ(id2, service.extension_id());
879 EXPECT_EQ(url2, service.download_url()); 879 EXPECT_EQ(url2, service.download_url());
880 EXPECT_FALSE(service.install_path().empty()); 880 EXPECT_FALSE(service.install_path().empty());
881 881
882 // Make sure the correct crx contents were passed for the update call. 882 // Make sure the correct crx contents were passed for the update call.
883 EXPECT_EQ(extension_file_path2, service.install_path()); 883 EXPECT_EQ(extension_file_path2, service.install_path());
884 884
885 if (updates_start_running) { 885 if (updates_start_running) {
886 EXPECT_TRUE(updater.crx_install_is_running_); 886 EXPECT_TRUE(updater.crx_install_is_running_);
887 fake_crx2->NotifyCrxInstallComplete(); 887 fake_crx2->NotifyCrxInstallComplete(NULL);
888 } 888 }
889 EXPECT_FALSE(updater.crx_install_is_running_); 889 EXPECT_FALSE(updater.crx_install_is_running_);
890 } 890 }
891 891
892 static void TestGalleryRequestsWithBrand(bool use_organic_brand_code) { 892 static void TestGalleryRequestsWithBrand(bool use_organic_brand_code) {
893 google_util::BrandForTesting brand_for_testing( 893 google_util::BrandForTesting brand_for_testing(
894 use_organic_brand_code ? "GGLS" : "TEST"); 894 use_organic_brand_code ? "GGLS" : "TEST");
895 895
896 // We want to test a variety of combinations of expected ping conditions for 896 // We want to test a variety of combinations of expected ping conditions for
897 // rollcall and active pings. 897 // rollcall and active pings.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 1260
1261 // TODO(asargent) - (http://crbug.com/12780) add tests for: 1261 // TODO(asargent) - (http://crbug.com/12780) add tests for:
1262 // -prodversionmin (shouldn't update if browser version too old) 1262 // -prodversionmin (shouldn't update if browser version too old)
1263 // -manifests & updates arriving out of order / interleaved 1263 // -manifests & updates arriving out of order / interleaved
1264 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 1264 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
1265 // -An extension gets uninstalled while updates are in progress (so it doesn't 1265 // -An extension gets uninstalled while updates are in progress (so it doesn't
1266 // "come back from the dead") 1266 // "come back from the dead")
1267 // -An extension gets manually updated to v3 while we're downloading v2 (ie 1267 // -An extension gets manually updated to v3 while we're downloading v2 (ie
1268 // you don't get downgraded accidentally) 1268 // you don't get downgraded accidentally)
1269 // -An update manifest mentions multiple updates 1269 // -An update manifest mentions multiple updates
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698