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

Side by Side Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 1455063004: Mojo C++ bindings: introduce MultiplexRouter and related classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/tests/router_unittest.cc ('k') | third_party/mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 MessageReceiver* test_message_receiver() { return test_message_receiver_; } 215 MessageReceiver* test_message_receiver() { return test_message_receiver_; }
216 216
217 ScopedMessagePipeHandle testee_endpoint() { return testee_endpoint_.Pass(); } 217 ScopedMessagePipeHandle testee_endpoint() { return testee_endpoint_.Pass(); }
218 218
219 private: 219 private:
220 class TestMessageReceiver : public MessageReceiver { 220 class TestMessageReceiver : public MessageReceiver {
221 public: 221 public:
222 TestMessageReceiver(ValidationIntegrationTest* owner, 222 TestMessageReceiver(ValidationIntegrationTest* owner,
223 ScopedMessagePipeHandle handle) 223 ScopedMessagePipeHandle handle)
224 : owner_(owner), connector_(handle.Pass()) { 224 : owner_(owner),
225 connector_(handle.Pass(),
226 mojo::internal::Connector::SINGLE_THREADED_SEND) {
225 connector_.set_enforce_errors_from_incoming_receiver(false); 227 connector_.set_enforce_errors_from_incoming_receiver(false);
226 } 228 }
227 ~TestMessageReceiver() override {} 229 ~TestMessageReceiver() override {}
228 230
229 bool Accept(Message* message) override { 231 bool Accept(Message* message) override {
230 bool rv = connector_.Accept(message); 232 bool rv = connector_.Accept(message);
231 owner_->PumpMessages(); 233 owner_->PumpMessages();
232 return rv; 234 return rv;
233 } 235 }
234 236
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 static_cast<StructWithEnum::EnumWithin>(2))); 473 static_cast<StructWithEnum::EnumWithin>(2)));
472 EXPECT_TRUE(StructWithEnum::EnumWithin_IsValidValue( 474 EXPECT_TRUE(StructWithEnum::EnumWithin_IsValidValue(
473 static_cast<StructWithEnum::EnumWithin>(3))); 475 static_cast<StructWithEnum::EnumWithin>(3)));
474 EXPECT_FALSE(StructWithEnum::EnumWithin_IsValidValue( 476 EXPECT_FALSE(StructWithEnum::EnumWithin_IsValidValue(
475 static_cast<StructWithEnum::EnumWithin>(4))); 477 static_cast<StructWithEnum::EnumWithin>(4)));
476 } 478 }
477 479
478 } // namespace 480 } // namespace
479 } // namespace test 481 } // namespace test
480 } // namespace mojo 482 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/router_unittest.cc ('k') | third_party/mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698