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

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

Issue 924603003: Remove ManifestFetchData parameter from SafeManifestParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged latest from origin/master Created 5 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
« no previous file with comments | « no previous file | extensions/browser/updater/extension_downloader.h » ('j') | 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) 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 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 const Extension* extension = tmp[0].get(); 1773 const Extension* extension = tmp[0].get();
1774 fetch_data->AddExtension(extension->id(), 1774 fetch_data->AddExtension(extension->id(),
1775 extension->VersionString(), 1775 extension->VersionString(),
1776 &kNeverPingedData, 1776 &kNeverPingedData,
1777 kEmptyUpdateUrlData, 1777 kEmptyUpdateUrlData,
1778 std::string(), 1778 std::string(),
1779 false); 1779 false);
1780 UpdateManifest::Results results; 1780 UpdateManifest::Results results;
1781 results.daystart_elapsed_seconds = 750; 1781 results.daystart_elapsed_seconds = 750;
1782 1782
1783 updater.downloader_->HandleManifestResults(*fetch_data, &results); 1783 updater.downloader_->HandleManifestResults(fetch_data.get(), &results);
1784 Time last_ping_day = 1784 Time last_ping_day =
1785 service.extension_prefs()->LastPingDay(extension->id()); 1785 service.extension_prefs()->LastPingDay(extension->id());
1786 EXPECT_FALSE(last_ping_day.is_null()); 1786 EXPECT_FALSE(last_ping_day.is_null());
1787 int64 seconds_diff = (Time::Now() - last_ping_day).InSeconds(); 1787 int64 seconds_diff = (Time::Now() - last_ping_day).InSeconds();
1788 EXPECT_LT(seconds_diff - results.daystart_elapsed_seconds, 5); 1788 EXPECT_LT(seconds_diff - results.daystart_elapsed_seconds, 5);
1789 } 1789 }
1790 1790
1791 // This lets us run a test with some enabled and some disabled 1791 // This lets us run a test with some enabled and some disabled
1792 // extensions. The |num_enabled| value specifies how many enabled extensions 1792 // extensions. The |num_enabled| value specifies how many enabled extensions
1793 // to have, and |disabled| is a vector of DisableReason bitmasks for each 1793 // to have, and |disabled| is a vector of DisableReason bitmasks for each
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 // -prodversionmin (shouldn't update if browser version too old) 2245 // -prodversionmin (shouldn't update if browser version too old)
2246 // -manifests & updates arriving out of order / interleaved 2246 // -manifests & updates arriving out of order / interleaved
2247 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 2247 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
2248 // -An extension gets uninstalled while updates are in progress (so it doesn't 2248 // -An extension gets uninstalled while updates are in progress (so it doesn't
2249 // "come back from the dead") 2249 // "come back from the dead")
2250 // -An extension gets manually updated to v3 while we're downloading v2 (ie 2250 // -An extension gets manually updated to v3 while we're downloading v2 (ie
2251 // you don't get downgraded accidentally) 2251 // you don't get downgraded accidentally)
2252 // -An update manifest mentions multiple updates 2252 // -An update manifest mentions multiple updates
2253 2253
2254 } // namespace extensions 2254 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/updater/extension_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698