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

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 12494028: Move Requirements out of Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 35354a464c33c403654a30083dbb49b9d71bd4c4..7bafe817fc7283d31db3a9e6901502016c55b269 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -54,7 +54,9 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/api/requirements/requirements_handler.h"
#include "chrome/common/extensions/feature_switch.h"
+#include "chrome/common/extensions/manifest_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
@@ -400,10 +402,12 @@ class DownloadTest : public InProcessBrowserTest {
DownloadTest() {}
virtual void SetUpOnMainThread() OVERRIDE {
+ InProcessBrowserTest::SetUpOnMainThread();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
ASSERT_TRUE(InitialSetup());
+ (new extensions::RequirementsHandler)->Register();
}
virtual void CleanUpOnMainThread() OVERRIDE {
@@ -411,6 +415,9 @@ class DownloadTest : public InProcessBrowserTest {
// reference to the ChromeDownloadManagerDelegate which should be destroyed
// on the UI thread.
file_activity_observer_.reset();
+
+ extensions::ManifestHandler::ClearRegistryForTesting();
+ InProcessBrowserTest::CleanUpOnMainThread();
}
// Returning false indicates a failure of the setup, and should be asserted

Powered by Google App Engine
This is Rietveld 408576698