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

Unified Diff: extensions/browser/extensions_test_browser_context.h

Issue 355223002: Add ExtensionsTestBrowserContext class for test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make as member Created 6 years, 5 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: extensions/browser/extensions_test_browser_context.h
diff --git a/extensions/browser/extensions_test_browser_context.h b/extensions/browser/extensions_test_browser_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..14c4b5c3302e78bd8bfe10e512b09b151cf89829
--- /dev/null
+++ b/extensions/browser/extensions_test_browser_context.h
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_COMMON_EXTENSIONS_TEST_BROWSER_CONTEXT_H_
+#define EXTENSIONS_COMMON_EXTENSIONS_TEST_BROWSER_CONTEXT_H_
+
+#include "content/public/test/test_browser_context.h"
+#include "extensions/browser/test_extensions_browser_client.h"
+
+namespace extensions {
+
+// An implementation of BrowserContext used for extension testing. It will set
+// necessary extension state like the ExtensionsBrowserClient and any keyed
+// services, and cleans up after itself on destruction.
+class ExtensionsTestBrowserContext : public content::TestBrowserContext {
+ public:
+ ExtensionsTestBrowserContext();
+ virtual ~ExtensionsTestBrowserContext();
+
+ private:
+ TestExtensionsBrowserClient extensions_browser_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionsTestBrowserContext);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_COMMON_EXTENSIONS_TEST_BROWSER_CONTEXT_H_

Powered by Google App Engine
This is Rietveld 408576698