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

Unified Diff: mojo/fetcher/about_fetcher_unittest.cc

Issue 1352663002: Extract some stuff into PackageManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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 | « mojo/fetcher/BUILD.gn ('k') | mojo/fetcher/base_application_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/fetcher/about_fetcher_unittest.cc
diff --git a/mojo/fetcher/about_fetcher_unittest.cc b/mojo/fetcher/about_fetcher_unittest.cc
index 79c487a21d4b950b4e1e29d3dd247746814ccbd0..b69d349eb2a387ccffdae470c5c84863b1d36454 100644
--- a/mojo/fetcher/about_fetcher_unittest.cc
+++ b/mojo/fetcher/about_fetcher_unittest.cc
@@ -15,7 +15,7 @@
#include "mojo/application/public/interfaces/content_handler.mojom.h"
#include "mojo/common/weak_binding_set.h"
#include "mojo/fetcher/about_fetcher.h"
-#include "mojo/fetcher/base_application_fetcher.h"
+#include "mojo/package_manager/package_manager_impl.h"
#include "mojo/runner/context.h"
#include "mojo/shell/application_loader.h"
#include "mojo/shell/application_manager.h"
@@ -125,13 +125,15 @@ class AboutFetcherTest : public testing::Test {
runner::Context::EnsureEmbedderIsInitialized();
base::FilePath shell_dir;
PathService::Get(base::DIR_MODULE, &shell_dir);
- application_manager_.reset(new shell::ApplicationManager(
- make_scoped_ptr(new BaseApplicationFetcher(shell_dir))));
+ scoped_ptr<package_manager::PackageManagerImpl> package_manager(
+ new package_manager::PackageManagerImpl(shell_dir));
+ package_manager->RegisterContentHandler(
+ "text/html", GURL("test:html_content_handler"));
+ application_manager_.reset(
+ new shell::ApplicationManager(package_manager.Pass()));
application_manager_->SetLoaderForURL(
make_scoped_ptr(new TestLoader(&html_content_handler_)),
GURL("test:html_content_handler"));
- application_manager_->RegisterContentHandler(
- "text/html", GURL("test:html_content_handler"));
}
void TearDown() override { application_manager_.reset(); }
« no previous file with comments | « mojo/fetcher/BUILD.gn ('k') | mojo/fetcher/base_application_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698