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

Unified Diff: shell/shell_apptest.cc

Issue 1932713003: More SynchronousInterfacePtr conversion + some related pexe content handler cleanup. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 | « shell/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/shell_apptest.cc
diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
index f4b8154a5e388325ae76a6af95fc41e0f705a3d3..7f64883422096caccdaf53e4c22650610c09d12a 100644
--- a/shell/shell_apptest.cc
+++ b/shell/shell_apptest.cc
@@ -15,10 +15,11 @@
#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/synchronous_interface_ptr.h"
#include "mojo/public/cpp/system/macros.h"
#include "mojo/public/interfaces/application/application_connector.mojom.h"
#include "mojo/services/http_server/cpp/http_server_util.h"
-#include "mojo/services/http_server/interfaces/http_server.mojom.h"
+#include "mojo/services/http_server/interfaces/http_server.mojom-sync.h"
#include "mojo/services/http_server/interfaces/http_server_factory.mojom.h"
#include "mojo/services/network/interfaces/net_address.mojom.h"
#include "shell/kPingable.h"
@@ -92,23 +93,22 @@ class ShellHTTPAppTest : public ShellAppTest {
local_address->ipv4->addr[2] = 0;
local_address->ipv4->addr[3] = 1;
local_address->ipv4->port = 0;
- http_server_factory_->CreateHttpServer(GetProxy(&http_server_),
+ http_server_factory_->CreateHttpServer(GetSynchronousProxy(&http_server_),
local_address.Pass());
- http_server_->GetPort([this](uint16_t p) { port_ = p; });
- EXPECT_TRUE(http_server_.WaitForIncomingResponse());
+ EXPECT_TRUE(http_server_->GetPort(&port_));
http_server::HttpHandlerPtr http_handler;
handler_.reset(new GetHandler(GetProxy(&http_handler).Pass(), port_));
- http_server_->SetHandler(".*", http_handler.Pass(),
- [](bool result) { EXPECT_TRUE(result); });
- EXPECT_TRUE(http_server_.WaitForIncomingResponse());
+ bool result = false;
+ EXPECT_TRUE(http_server_->SetHandler(".*", http_handler.Pass(), &result));
+ EXPECT_TRUE(result);
}
std::string GetURL(const std::string& path) { return ::GetURL(port_, path); }
http_server::HttpServerFactoryPtr http_server_factory_;
- http_server::HttpServerPtr http_server_;
+ mojo::SynchronousInterfacePtr<http_server::HttpServer> http_server_;
scoped_ptr<GetHandler> handler_;
uint16_t port_;
« no previous file with comments | « shell/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698