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

Unified Diff: mojo/public/cpp/bindings/tests/router_unittest.cc

Issue 1713203002: Mojo C++ bindings: support sync methods - part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/public/cpp/bindings/message.h ('k') | mojo/public/cpp/bindings/tests/sync_method_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/router_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/router_unittest.cc b/mojo/public/cpp/bindings/tests/router_unittest.cc
index e88f0e828ec4a7cb7ed7c516e3a6782c80cbb3e7..1f7160e5f6b3c091369e3044662b6c9e4d9b03fe 100644
--- a/mojo/public/cpp/bindings/tests/router_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/router_unittest.cc
@@ -39,8 +39,8 @@ class RouterTest : public testing::Test {
};
TEST_F(RouterTest, BasicRequestResponse) {
- internal::Router router0(std::move(handle0_), internal::FilterChain());
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(), false);
+ internal::Router router1(std::move(handle1_), internal::FilterChain(), false);
ResponseGenerator generator;
router1.set_incoming_receiver(&generator);
@@ -83,8 +83,8 @@ TEST_F(RouterTest, BasicRequestResponse) {
}
TEST_F(RouterTest, BasicRequestResponse_Synchronous) {
- internal::Router router0(std::move(handle0_), internal::FilterChain());
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(), false);
+ internal::Router router1(std::move(handle1_), internal::FilterChain(), false);
ResponseGenerator generator;
router1.set_incoming_receiver(&generator);
@@ -125,8 +125,8 @@ TEST_F(RouterTest, BasicRequestResponse_Synchronous) {
}
TEST_F(RouterTest, RequestWithNoReceiver) {
- internal::Router router0(std::move(handle0_), internal::FilterChain());
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(), false);
+ internal::Router router1(std::move(handle1_), internal::FilterChain(), false);
// Without an incoming receiver set on router1, we expect router0 to observe
// an error as a result of sending a message.
@@ -151,8 +151,8 @@ TEST_F(RouterTest, RequestWithNoReceiver) {
// Tests Router using the LazyResponseGenerator. The responses will not be
// sent until after the requests have been accepted.
TEST_F(RouterTest, LazyResponses) {
- internal::Router router0(std::move(handle0_), internal::FilterChain());
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(), false);
+ internal::Router router1(std::move(handle1_), internal::FilterChain(), false);
base::RunLoop run_loop;
LazyResponseGenerator generator(run_loop.QuitClosure());
@@ -217,7 +217,7 @@ TEST_F(RouterTest, LazyResponses) {
// both sides still appear to have a valid message pipe handle bound.
TEST_F(RouterTest, MissingResponses) {
base::RunLoop run_loop0, run_loop1;
- internal::Router router0(std::move(handle0_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(), false);
bool error_handler_called0 = false;
router0.set_connection_error_handler(
[&error_handler_called0, &run_loop0]() {
@@ -225,7 +225,7 @@ TEST_F(RouterTest, MissingResponses) {
run_loop0.Quit();
});
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router1(std::move(handle1_), internal::FilterChain(), false);
bool error_handler_called1 = false;
router1.set_connection_error_handler(
[&error_handler_called1, &run_loop1]() {
@@ -277,8 +277,10 @@ TEST_F(RouterTest, LateResponse) {
base::RunLoop run_loop;
LazyResponseGenerator generator(run_loop.QuitClosure());
{
- internal::Router router0(std::move(handle0_), internal::FilterChain());
- internal::Router router1(std::move(handle1_), internal::FilterChain());
+ internal::Router router0(std::move(handle0_), internal::FilterChain(),
+ false);
+ internal::Router router1(std::move(handle1_), internal::FilterChain(),
+ false);
router1.set_incoming_receiver(&generator);
« no previous file with comments | « mojo/public/cpp/bindings/message.h ('k') | mojo/public/cpp/bindings/tests/sync_method_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698