| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 ExtensionUpdaterTest() | 471 ExtensionUpdaterTest() |
| 472 : ui_thread_(BrowserThread::UI, &loop_), | 472 : ui_thread_(BrowserThread::UI, &loop_), |
| 473 file_thread_(BrowserThread::FILE, &loop_), | 473 file_thread_(BrowserThread::FILE, &loop_), |
| 474 io_thread_(BrowserThread::IO, &loop_) { | 474 io_thread_(BrowserThread::IO, &loop_) { |
| 475 } | 475 } |
| 476 | 476 |
| 477 virtual ~ExtensionUpdaterTest() { | 477 virtual ~ExtensionUpdaterTest() { |
| 478 } | 478 } |
| 479 | 479 |
| 480 virtual void SetUp() OVERRIDE { | 480 virtual void SetUp() OVERRIDE { |
| 481 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy())); | 481 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get())); |
| 482 } | 482 } |
| 483 | 483 |
| 484 virtual void TearDown() OVERRIDE { | 484 virtual void TearDown() OVERRIDE { |
| 485 // Some tests create URLRequestContextGetters, whose destruction must run | 485 // Some tests create URLRequestContextGetters, whose destruction must run |
| 486 // on the IO thread. Make sure the IO loop spins before shutdown so that | 486 // on the IO thread. Make sure the IO loop spins before shutdown so that |
| 487 // those objects are released. | 487 // those objects are released. |
| 488 RunUntilIdle(); | 488 RunUntilIdle(); |
| 489 prefs_.reset(); | 489 prefs_.reset(); |
| 490 } | 490 } |
| 491 | 491 |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 // on the delta between now and the last ping time (or in the case of active | 1301 // on the delta between now and the last ping time (or in the case of active |
| 1302 // pings, that delta plus whether the app has been active). | 1302 // pings, that delta plus whether the app has been active). |
| 1303 void TestGalleryRequests(int rollcall_ping_days, | 1303 void TestGalleryRequests(int rollcall_ping_days, |
| 1304 int active_ping_days, | 1304 int active_ping_days, |
| 1305 bool active_bit, | 1305 bool active_bit, |
| 1306 bool expect_brand_code) { | 1306 bool expect_brand_code) { |
| 1307 net::TestURLFetcherFactory factory; | 1307 net::TestURLFetcherFactory factory; |
| 1308 | 1308 |
| 1309 // Set up 2 mock extensions, one with a google.com update url and one | 1309 // Set up 2 mock extensions, one with a google.com update url and one |
| 1310 // without. | 1310 // without. |
| 1311 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy())); | 1311 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get())); |
| 1312 ServiceForManifestTests service(prefs_.get()); | 1312 ServiceForManifestTests service(prefs_.get()); |
| 1313 ExtensionList tmp; | 1313 ExtensionList tmp; |
| 1314 GURL url1("http://clients2.google.com/service/update2/crx"); | 1314 GURL url1("http://clients2.google.com/service/update2/crx"); |
| 1315 GURL url2("http://www.somewebsite.com"); | 1315 GURL url2("http://www.somewebsite.com"); |
| 1316 service.CreateTestExtensions(1, 1, &tmp, &url1.possibly_invalid_spec(), | 1316 service.CreateTestExtensions(1, 1, &tmp, &url1.possibly_invalid_spec(), |
| 1317 Manifest::INTERNAL); | 1317 Manifest::INTERNAL); |
| 1318 service.CreateTestExtensions(2, 1, &tmp, &url2.possibly_invalid_spec(), | 1318 service.CreateTestExtensions(2, 1, &tmp, &url2.possibly_invalid_spec(), |
| 1319 Manifest::INTERNAL); | 1319 Manifest::INTERNAL); |
| 1320 EXPECT_EQ(2u, tmp.size()); | 1320 EXPECT_EQ(2u, tmp.size()); |
| 1321 service.set_extensions(tmp); | 1321 service.set_extensions(tmp); |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 // -prodversionmin (shouldn't update if browser version too old) | 1728 // -prodversionmin (shouldn't update if browser version too old) |
| 1729 // -manifests & updates arriving out of order / interleaved | 1729 // -manifests & updates arriving out of order / interleaved |
| 1730 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1730 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1731 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1731 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1732 // "come back from the dead") | 1732 // "come back from the dead") |
| 1733 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1733 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1734 // you don't get downgraded accidentally) | 1734 // you don't get downgraded accidentally) |
| 1735 // -An update manifest mentions multiple updates | 1735 // -An update manifest mentions multiple updates |
| 1736 | 1736 |
| 1737 } // namespace extensions | 1737 } // namespace extensions |
| OLD | NEW |