OLD | NEW |
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 "chrome/browser/extensions/updater/extension_updater.h" | 5 #include "chrome/browser/extensions/updater/extension_updater.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 MockExtensionDownloaderDelegate delegate; | 812 MockExtensionDownloaderDelegate delegate; |
813 ExtensionDownloader downloader(&delegate, service.request_context()); | 813 ExtensionDownloader downloader(&delegate, service.request_context()); |
814 ExtensionList extensions; | 814 ExtensionList extensions; |
815 std::string url(gallery_url); | 815 std::string url(gallery_url); |
816 | 816 |
817 service.CreateTestExtensions(1, 1, &extensions, &url, Manifest::INTERNAL); | 817 service.CreateTestExtensions(1, 1, &extensions, &url, Manifest::INTERNAL); |
818 | 818 |
819 const std::string& id = extensions[0]->id(); | 819 const std::string& id = extensions[0]->id(); |
820 EXPECT_CALL(delegate, GetPingDataForExtension(id, _)); | 820 EXPECT_CALL(delegate, GetPingDataForExtension(id, _)); |
821 | 821 |
822 downloader.AddExtension(*extensions[0].get(), 0); | 822 downloader.AddExtension(*extensions[0], 0); |
823 downloader.StartAllPending(NULL); | 823 downloader.StartAllPending(NULL); |
824 net::TestURLFetcher* fetcher = | 824 net::TestURLFetcher* fetcher = |
825 factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId); | 825 factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId); |
826 ASSERT_TRUE(fetcher); | 826 ASSERT_TRUE(fetcher); |
827 // Make sure that extensions that update from the gallery ignore any | 827 // Make sure that extensions that update from the gallery ignore any |
828 // update URL data. | 828 // update URL data. |
829 const std::string& update_url = fetcher->GetOriginalURL().spec(); | 829 const std::string& update_url = fetcher->GetOriginalURL().spec(); |
830 std::string::size_type x = update_url.find("x="); | 830 std::string::size_type x = update_url.find("x="); |
831 EXPECT_NE(std::string::npos, x); | 831 EXPECT_NE(std::string::npos, x); |
832 std::string::size_type ap = update_url.find("ap%3D", x); | 832 std::string::size_type ap = update_url.find("ap%3D", x); |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2262 // -prodversionmin (shouldn't update if browser version too old) | 2262 // -prodversionmin (shouldn't update if browser version too old) |
2263 // -manifests & updates arriving out of order / interleaved | 2263 // -manifests & updates arriving out of order / interleaved |
2264 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 2264 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
2265 // -An extension gets uninstalled while updates are in progress (so it doesn't | 2265 // -An extension gets uninstalled while updates are in progress (so it doesn't |
2266 // "come back from the dead") | 2266 // "come back from the dead") |
2267 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 2267 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
2268 // you don't get downgraded accidentally) | 2268 // you don't get downgraded accidentally) |
2269 // -An update manifest mentions multiple updates | 2269 // -An update manifest mentions multiple updates |
2270 | 2270 |
2271 } // namespace extensions | 2271 } // namespace extensions |
OLD | NEW |