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 <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 Loading... |
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 Loading... |
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 |
OLD | NEW |