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

Unified Diff: mojo/shell/application_manager_apptest.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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/services/tracing/public/cpp/tracing_impl.cc ('k') | mojo/shell/application_manager_apptest_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager_apptest.cc
diff --git a/mojo/shell/application_manager_apptest.cc b/mojo/shell/application_manager_apptest.cc
index e0abdd5b083c1cdbbe5b35d6fbf9bc665a236021..fb6517ef6a2808daa96ecd0f555d0539419040f8 100644
--- a/mojo/shell/application_manager_apptest.cc
+++ b/mojo/shell/application_manager_apptest.cc
@@ -14,9 +14,9 @@
#include "mojo/common/weak_binding_set.h"
#include "mojo/converters/network/network_type_converters.h"
#include "mojo/shell/application_manager_apptests.mojom.h"
-#include "mojo/shell/public/cpp/application_impl.h"
#include "mojo/shell/public/cpp/application_test_base.h"
#include "mojo/shell/public/cpp/interface_factory.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "mojo/shell/public/interfaces/application_manager.mojom.h"
using mojo::shell::test::mojom::CreateInstanceForHandleTest;
@@ -39,7 +39,7 @@ class ApplicationManagerAppTestDelegate
private:
// ApplicationDelegate:
- void Initialize(ApplicationImpl* app) override {}
+ void Initialize(Shell* shell, const std::string& url, uint32_t id) override {}
bool AcceptConnection(ApplicationConnection* connection) override {
connection->AddService<CreateInstanceForHandleTest>(this);
return true;
@@ -92,7 +92,7 @@ class ApplicationManagerAppTest : public mojo::test::ApplicationTestBase,
void AddListenerAndWaitForApplications() {
mojom::ApplicationManagerPtr application_manager;
- application_impl()->ConnectToService("mojo:shell", &application_manager);
+ shell()->ConnectToService("mojo:shell", &application_manager);
application_manager->AddListener(binding_.CreateInterfacePtrAndBind());
binding_.WaitForIncomingMethodCall();
@@ -175,8 +175,7 @@ TEST_F(ApplicationManagerAppTest, CreateInstanceForHandle) {
// launches a process. #becauselinkerrors).
mojo::shell::test::mojom::DriverPtr driver;
scoped_ptr<ApplicationConnection> connection =
- application_impl()->ConnectToApplication(
- "exe:application_manager_apptest_driver");
+ shell()->ConnectToApplication("exe:application_manager_apptest_driver");
connection->ConnectToService(&driver);
// 2. Wait for the target to connect to us. (via
« no previous file with comments | « mojo/services/tracing/public/cpp/tracing_impl.cc ('k') | mojo/shell/application_manager_apptest_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698