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

Unified Diff: services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc

Issue 1990603002: Make ApplicationTestBase not use ApplicationImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delete ApplicationImpl::WaitForInitialize() Created 4 years, 7 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: services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
diff --git a/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc b/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
index 905464c1e34162acfacd6dbff01f52b56050a236..5e8e7b753d4f687b41907f6e3e0fa245ed7368f5 100644
--- a/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
+++ b/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
@@ -8,9 +8,9 @@
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "mojo/data_pipe_utils/data_pipe_utils.h"
-#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/application_test_base.h"
#include "mojo/public/cpp/application/connect.h"
+#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_handle.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/services/http_server/cpp/http_server_util.h"
@@ -84,7 +84,7 @@ class MojoUrlRedirectorApplicationTest :
// Obtain the port that the redirector is at and the port that we should
// spin up the app location files server at.
uint16_t app_location_files_port = 0;
- for (const std::string& arg : application_impl()->args()) {
+ for (const std::string& arg : args()) {
if (arg.find("--redirector_port") != std::string::npos) {
sscanf(arg.c_str(), "--redirector_port=%hu", &redirector_port_);
} else if (arg.find("--app_location_files_port") != std::string::npos) {
@@ -100,7 +100,7 @@ class MojoUrlRedirectorApplicationTest :
binding_.Bind(GetProxy(&location_files_handler));
http_server::HttpServerFactoryPtr http_server_factory;
- mojo::ConnectToService(application_impl()->shell(), "mojo:http_server",
+ mojo::ConnectToService(shell(), "mojo:http_server",
GetProxy(&http_server_factory));
mojo::NetAddressPtr location_files_server_addr(mojo::NetAddress::New());
@@ -125,9 +125,9 @@ class MojoUrlRedirectorApplicationTest :
// Connect to the redirector and wait until it registers itself as a
// handler with the server on |redirector_port_|.
- application_impl()->shell()->ConnectToApplication(
- "mojo:mojo_url_redirector", GetProxy(&url_redirector_sp_), nullptr);
- mojo::ConnectToService(application_impl()->shell(), "mojo:network_service",
+ shell()->ConnectToApplication("mojo:mojo_url_redirector",
+ GetProxy(&url_redirector_sp_), nullptr);
+ mojo::ConnectToService(shell(), "mojo:network_service",
GetProxy(&network_service_));
WaitForRedirectorRegistration();
}
« no previous file with comments | « services/prediction/prediction_apptests.cc ('k') | services/url_response_disk_cache/url_response_disk_cache_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698