| 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 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/extensions/updater/extension_downloader.h" | 36 #include "chrome/browser/extensions/updater/extension_downloader.h" |
| 37 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" | 37 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" |
| 38 #include "chrome/browser/extensions/updater/extension_updater.h" | 38 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 39 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" | 39 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" |
| 40 #include "chrome/browser/extensions/updater/request_queue_impl.h" | 40 #include "chrome/browser/extensions/updater/request_queue_impl.h" |
| 41 #include "chrome/browser/google/google_util.h" | 41 #include "chrome/browser/google/google_util.h" |
| 42 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
| 43 #include "chrome/common/chrome_notification_types.h" | 43 #include "chrome/common/chrome_notification_types.h" |
| 44 #include "chrome/common/extensions/extension.h" | 44 #include "chrome/common/extensions/extension.h" |
| 45 #include "chrome/common/extensions/extension_manifest_constants.h" | 45 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 46 #include "chrome/common/extensions/manifest_handler.h" |
| 47 #include "chrome/common/extensions/manifest_url_handler.h" |
| 46 #include "chrome/common/pref_names.h" | 48 #include "chrome/common/pref_names.h" |
| 47 #include "chrome/test/base/testing_profile.h" | 49 #include "chrome/test/base/testing_profile.h" |
| 48 #include "content/public/browser/notification_details.h" | 50 #include "content/public/browser/notification_details.h" |
| 49 #include "content/public/browser/notification_observer.h" | 51 #include "content/public/browser/notification_observer.h" |
| 50 #include "content/public/browser/notification_registrar.h" | 52 #include "content/public/browser/notification_registrar.h" |
| 51 #include "content/public/browser/notification_service.h" | 53 #include "content/public/browser/notification_service.h" |
| 52 #include "content/public/browser/notification_source.h" | 54 #include "content/public/browser/notification_source.h" |
| 53 #include "content/public/test/test_browser_thread.h" | 55 #include "content/public/test/test_browser_thread.h" |
| 54 #include "libxml/globals.h" | 56 #include "libxml/globals.h" |
| 55 #include "net/base/backoff_entry.h" | 57 #include "net/base/backoff_entry.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 : ui_thread_(BrowserThread::UI, &loop_), | 451 : ui_thread_(BrowserThread::UI, &loop_), |
| 450 file_thread_(BrowserThread::FILE, &loop_), | 452 file_thread_(BrowserThread::FILE, &loop_), |
| 451 io_thread_(BrowserThread::IO, &loop_) { | 453 io_thread_(BrowserThread::IO, &loop_) { |
| 452 } | 454 } |
| 453 | 455 |
| 454 virtual ~ExtensionUpdaterTest() { | 456 virtual ~ExtensionUpdaterTest() { |
| 455 } | 457 } |
| 456 | 458 |
| 457 virtual void SetUp() OVERRIDE { | 459 virtual void SetUp() OVERRIDE { |
| 458 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy())); | 460 prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy())); |
| 461 extensions::ManifestHandler::Register(extension_manifest_keys::kUpdateURL, |
| 462 new extensions::UpdateURLHandler); |
| 459 } | 463 } |
| 460 | 464 |
| 461 virtual void TearDown() OVERRIDE { | 465 virtual void TearDown() OVERRIDE { |
| 462 // Some tests create URLRequestContextGetters, whose destruction must run | 466 // Some tests create URLRequestContextGetters, whose destruction must run |
| 463 // on the IO thread. Make sure the IO loop spins before shutdown so that | 467 // on the IO thread. Make sure the IO loop spins before shutdown so that |
| 464 // those objects are released. | 468 // those objects are released. |
| 465 RunUntilIdle(); | 469 RunUntilIdle(); |
| 466 prefs_.reset(); | 470 prefs_.reset(); |
| 467 } | 471 } |
| 468 | 472 |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 // -prodversionmin (shouldn't update if browser version too old) | 1692 // -prodversionmin (shouldn't update if browser version too old) |
| 1689 // -manifests & updates arriving out of order / interleaved | 1693 // -manifests & updates arriving out of order / interleaved |
| 1690 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1694 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1691 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1695 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1692 // "come back from the dead") | 1696 // "come back from the dead") |
| 1693 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1697 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1694 // you don't get downgraded accidentally) | 1698 // you don't get downgraded accidentally) |
| 1695 // -An update manifest mentions multiple updates | 1699 // -An update manifest mentions multiple updates |
| 1696 | 1700 |
| 1697 } // namespace extensions | 1701 } // namespace extensions |
| OLD | NEW |