| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |