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

Unified Diff: extensions/browser/extensions_test.cc

Issue 2112543002: Convert UtilityProcessHost to bootstrap Mojo Channel using the Shell connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p9x
Patch Set: . Created 4 years, 6 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
« no previous file with comments | « content/utility/utility_thread_impl.cc ('k') | extensions/browser/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extensions_test.cc
diff --git a/extensions/browser/extensions_test.cc b/extensions/browser/extensions_test.cc
index bb37b3aa5aadaa196fdd3baf213272808daaeafd..4ae1236ac99354b7d34397e81b5b4ef1767ac03e 100644
--- a/extensions/browser/extensions_test.cc
+++ b/extensions/browser/extensions_test.cc
@@ -10,8 +10,29 @@
#include "content/public/test/test_browser_context.h"
#include "extensions/browser/test_extensions_browser_client.h"
#include "extensions/test/test_content_utility_client.h"
+#include "ui/base/resource/resource_bundle.h"
namespace extensions {
+namespace {
+
+class ExtensionsTestContentClient : public content::ContentClient {
+ public:
+ ExtensionsTestContentClient() {}
+ ~ExtensionsTestContentClient() override {}
+
+ // content::ContentClient overrides:
+ base::StringPiece GetDataResource(
+ int resource_id,
+ ui::ScaleFactor scale_factor) const override {
+ return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ resource_id, scale_factor);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ExtensionsTestContentClient);
+};
+
+} // namespace
// This class does work in the constructor instead of SetUp() to give subclasses
// a valid BrowserContext to use while initializing their members. For example:
@@ -22,7 +43,7 @@ namespace extensions {
// }
// };
ExtensionsTest::ExtensionsTest()
- : content_client_(new content::ContentClient),
+ : content_client_(new ExtensionsTestContentClient),
content_utility_client_(new TestContentUtilityClient),
content_browser_client_(new content::ContentBrowserClient),
browser_context_(new content::TestBrowserContext),
« no previous file with comments | « content/utility/utility_thread_impl.cc ('k') | extensions/browser/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698