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

Unified Diff: shell/application_manager/application_manager_unittest.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android Created 5 years, 11 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: shell/application_manager/application_manager_unittest.cc
diff --git a/shell/application_manager/application_manager_unittest.cc b/shell/application_manager/application_manager_unittest.cc
index 411e7239749c0e331579183d2566c67b948a6f26..8f5a691b1da8081287577afb4ba0ab274145e9bb 100644
--- a/shell/application_manager/application_manager_unittest.cc
+++ b/shell/application_manager/application_manager_unittest.cc
@@ -115,10 +115,10 @@ class TestApplicationLoader : public ApplicationLoader,
// ApplicationLoader implementation.
void Load(ApplicationManager* manager,
const GURL& url,
- ShellPtr shell,
+ InterfaceRequest<Application> application_request,
LoadCallback callback) override {
++num_loads_;
- test_app_.reset(new ApplicationImpl(this, shell.Pass()));
+ test_app_.reset(new ApplicationImpl(this, application_request.Pass()));
}
void OnApplicationError(ApplicationManager* manager,
@@ -330,9 +330,9 @@ class Tester : public ApplicationDelegate,
private:
void Load(ApplicationManager* manager,
const GURL& url,
- ShellPtr shell,
+ InterfaceRequest<Application> application_request,
LoadCallback callback) override {
- app_.reset(new ApplicationImpl(this, shell.Pass()));
+ app_.reset(new ApplicationImpl(this, application_request.Pass()));
}
void OnApplicationError(ApplicationManager* manager,
@@ -726,15 +726,13 @@ TEST_F(ApplicationManagerTest, MappedURLsShouldWorkWithLoaders) {
}
TEST_F(ApplicationManagerTest, ExternalApp) {
- MessagePipe shell_pipe;
- ShellPtr shell;
- shell.Bind(shell_pipe.handle0.Pass());
+ ApplicationPtr application;
TestExternal external;
std::vector<std::string> args;
args.push_back("test");
- ApplicationImpl app(&external, shell.Pass());
+ ApplicationImpl app(&external, GetProxy(&application));
application_manager_->RegisterExternalApplication(GURL("mojo:test"), args,
- shell_pipe.handle1.Pass());
+ application.Pass());
loop_.Run();
EXPECT_EQ(args, external.initialize_args());
application_manager_->ConnectToServiceByName(

Powered by Google App Engine
This is Rietveld 408576698