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

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

Issue 316963002: Move branding information out of google_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 6 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
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 17 matching lines...) Expand all
28 #include "chrome/browser/extensions/extension_error_reporter.h" 28 #include "chrome/browser/extensions/extension_error_reporter.h"
29 #include "chrome/browser/extensions/extension_sync_data.h" 29 #include "chrome/browser/extensions/extension_sync_data.h"
30 #include "chrome/browser/extensions/test_extension_prefs.h" 30 #include "chrome/browser/extensions/test_extension_prefs.h"
31 #include "chrome/browser/extensions/test_extension_service.h" 31 #include "chrome/browser/extensions/test_extension_service.h"
32 #include "chrome/browser/extensions/test_extension_system.h" 32 #include "chrome/browser/extensions/test_extension_system.h"
33 #include "chrome/browser/extensions/updater/extension_downloader.h" 33 #include "chrome/browser/extensions/updater/extension_downloader.h"
34 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" 34 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h"
35 #include "chrome/browser/extensions/updater/extension_updater.h" 35 #include "chrome/browser/extensions/updater/extension_updater.h"
36 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" 36 #include "chrome/browser/extensions/updater/manifest_fetch_data.h"
37 #include "chrome/browser/extensions/updater/request_queue_impl.h" 37 #include "chrome/browser/extensions/updater/request_queue_impl.h"
38 #include "chrome/browser/google/google_brand.h"
38 #include "chrome/browser/google/google_util.h" 39 #include "chrome/browser/google/google_util.h"
39 #include "chrome/browser/omaha_query_params/omaha_query_params.h" 40 #include "chrome/browser/omaha_query_params/omaha_query_params.h"
40 #include "chrome/browser/prefs/pref_service_syncable.h" 41 #include "chrome/browser/prefs/pref_service_syncable.h"
41 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
42 #include "chrome/test/base/testing_profile.h" 43 #include "chrome/test/base/testing_profile.h"
43 #include "content/public/browser/notification_details.h" 44 #include "content/public/browser/notification_details.h"
44 #include "content/public/browser/notification_observer.h" 45 #include "content/public/browser/notification_observer.h"
45 #include "content/public/browser/notification_registrar.h" 46 #include "content/public/browser/notification_registrar.h"
46 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
47 #include "content/public/browser/notification_source.h" 48 #include "content/public/browser/notification_source.h"
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 EXPECT_EQ(extension_file_path2, service.install_path()); 1370 EXPECT_EQ(extension_file_path2, service.install_path());
1370 1371
1371 if (updates_start_running) { 1372 if (updates_start_running) {
1372 EXPECT_TRUE(updater.crx_install_is_running_); 1373 EXPECT_TRUE(updater.crx_install_is_running_);
1373 fake_crx2->NotifyCrxInstallComplete(false); 1374 fake_crx2->NotifyCrxInstallComplete(false);
1374 } 1375 }
1375 EXPECT_FALSE(updater.crx_install_is_running_); 1376 EXPECT_FALSE(updater.crx_install_is_running_);
1376 } 1377 }
1377 1378
1378 void TestGalleryRequestsWithBrand(bool use_organic_brand_code) { 1379 void TestGalleryRequestsWithBrand(bool use_organic_brand_code) {
1379 google_util::BrandForTesting brand_for_testing( 1380 google_brand::BrandForTesting brand_for_testing(
1380 use_organic_brand_code ? "GGLS" : "TEST"); 1381 use_organic_brand_code ? "GGLS" : "TEST");
1381 1382
1382 // We want to test a variety of combinations of expected ping conditions for 1383 // We want to test a variety of combinations of expected ping conditions for
1383 // rollcall and active pings. 1384 // rollcall and active pings.
1384 int ping_cases[] = { ManifestFetchData::kNeverPinged, 0, 1, 5 }; 1385 int ping_cases[] = { ManifestFetchData::kNeverPinged, 0, 1, 5 };
1385 1386
1386 for (size_t i = 0; i < arraysize(ping_cases); i++) { 1387 for (size_t i = 0; i < arraysize(ping_cases); i++) {
1387 for (size_t j = 0; j < arraysize(ping_cases); j++) { 1388 for (size_t j = 0; j < arraysize(ping_cases); j++) {
1388 for (size_t k = 0; k < 2; k++) { 1389 for (size_t k = 0; k < 2; k++) {
1389 int rollcall_ping_days = ping_cases[i]; 1390 int rollcall_ping_days = ping_cases[i];
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 // -prodversionmin (shouldn't update if browser version too old) 1868 // -prodversionmin (shouldn't update if browser version too old)
1868 // -manifests & updates arriving out of order / interleaved 1869 // -manifests & updates arriving out of order / interleaved
1869 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 1870 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
1870 // -An extension gets uninstalled while updates are in progress (so it doesn't 1871 // -An extension gets uninstalled while updates are in progress (so it doesn't
1871 // "come back from the dead") 1872 // "come back from the dead")
1872 // -An extension gets manually updated to v3 while we're downloading v2 (ie 1873 // -An extension gets manually updated to v3 while we're downloading v2 (ie
1873 // you don't get downgraded accidentally) 1874 // you don't get downgraded accidentally)
1874 // -An update manifest mentions multiple updates 1875 // -An update manifest mentions multiple updates
1875 1876
1876 } // namespace extensions 1877 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698