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

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

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 5 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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 kUpdateFrequencySecs); 850 kUpdateFrequencySecs);
851 updater.Start(); 851 updater.Start();
852 ResetDownloader( 852 ResetDownloader(
853 &updater, 853 &updater,
854 new ExtensionDownloader(&updater, service->request_context())); 854 new ExtensionDownloader(&updater, service->request_context()));
855 855
856 GURL test_url("http://localhost/extension.crx"); 856 GURL test_url("http://localhost/extension.crx");
857 857
858 std::string id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 858 std::string id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
859 std::string hash = ""; 859 std::string hash = "";
860 scoped_ptr<Version> version(Version::GetVersionFromString("0.0.1")); 860 Version version("0.0.1");
861 ASSERT_TRUE(version.get());
862 updater.downloader_->FetchUpdatedExtension( 861 updater.downloader_->FetchUpdatedExtension(
863 id, test_url, hash, version->GetString()); 862 id, test_url, hash, version.GetString());
864 863
865 if (pending) { 864 if (pending) {
866 const bool kIsFromSync = true; 865 const bool kIsFromSync = true;
867 const bool kInstallSilently = true; 866 const bool kInstallSilently = true;
868 PendingExtensionManager* pending_extension_manager = 867 PendingExtensionManager* pending_extension_manager =
869 service->pending_extension_manager(); 868 service->pending_extension_manager();
870 pending_extension_manager->AddForTesting( 869 pending_extension_manager->AddForTesting(
871 PendingExtensionInfo(id, test_url, *version, 870 PendingExtensionInfo(id, test_url, version,
872 &ShouldAlwaysInstall, kIsFromSync, 871 &ShouldAlwaysInstall, kIsFromSync,
873 kInstallSilently, 872 kInstallSilently,
874 Extension::INTERNAL)); 873 Extension::INTERNAL));
875 } 874 }
876 875
877 // Call back the ExtensionUpdater with a 200 response and some test data 876 // Call back the ExtensionUpdater with a 200 response and some test data
878 FilePath extension_file_path(FILE_PATH_LITERAL("/whatever")); 877 FilePath extension_file_path(FILE_PATH_LITERAL("/whatever"));
879 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId); 878 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId);
880 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL); 879 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL);
881 EXPECT_TRUE(fetcher->GetLoadFlags() == kExpectedLoadFlags); 880 EXPECT_TRUE(fetcher->GetLoadFlags() == kExpectedLoadFlags);
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 // -prodversionmin (shouldn't update if browser version too old) 1506 // -prodversionmin (shouldn't update if browser version too old)
1508 // -manifests & updates arriving out of order / interleaved 1507 // -manifests & updates arriving out of order / interleaved
1509 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 1508 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
1510 // -An extension gets uninstalled while updates are in progress (so it doesn't 1509 // -An extension gets uninstalled while updates are in progress (so it doesn't
1511 // "come back from the dead") 1510 // "come back from the dead")
1512 // -An extension gets manually updated to v3 while we're downloading v2 (ie 1511 // -An extension gets manually updated to v3 while we're downloading v2 (ie
1513 // you don't get downgraded accidentally) 1512 // you don't get downgraded accidentally)
1514 // -An update manifest mentions multiple updates 1513 // -An update manifest mentions multiple updates
1515 1514
1516 } // namespace extensions 1515 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_registry_extension_loader_win.cc ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698