| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 | 7 |
| 8 #include "mojo/public/cpp/bindings/lib/message_builder.h" | 8 #include "mojo/public/cpp/bindings/lib/message_builder.h" |
| 9 #include "mojo/public/cpp/bindings/lib/message_queue.h" | 9 #include "mojo/public/cpp/bindings/lib/message_queue.h" |
| 10 #include "mojo/public/cpp/bindings/lib/router.h" | 10 #include "mojo/public/cpp/bindings/lib/router.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 private: | 96 private: |
| 97 MessageReceiver* responder_; | 97 MessageReceiver* responder_; |
| 98 uint32_t name_; | 98 uint32_t name_; |
| 99 uint64_t request_id_; | 99 uint64_t request_id_; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 class RouterTest : public testing::Test { | 102 class RouterTest : public testing::Test { |
| 103 public: | 103 public: |
| 104 RouterTest() {} | 104 RouterTest() {} |
| 105 | 105 |
| 106 virtual void SetUp() override { | 106 void SetUp() override { |
| 107 CreateMessagePipe(nullptr, &handle0_, &handle1_); | 107 CreateMessagePipe(nullptr, &handle0_, &handle1_); |
| 108 } | 108 } |
| 109 | 109 |
| 110 virtual void TearDown() override {} | 110 void TearDown() override {} |
| 111 | 111 |
| 112 void PumpMessages() { loop_.RunUntilIdle(); } | 112 void PumpMessages() { loop_.RunUntilIdle(); } |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 ScopedMessagePipeHandle handle0_; | 115 ScopedMessagePipeHandle handle0_; |
| 116 ScopedMessagePipeHandle handle1_; | 116 ScopedMessagePipeHandle handle1_; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 Environment env_; | 119 Environment env_; |
| 120 RunLoop loop_; | 120 RunLoop loop_; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 EXPECT_TRUE(generator.has_responder()); | 213 EXPECT_TRUE(generator.has_responder()); |
| 214 } | 214 } |
| 215 | 215 |
| 216 generator.Complete(); // This should end up doing nothing. | 216 generator.Complete(); // This should end up doing nothing. |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace | 219 } // namespace |
| 220 } // namespace test | 220 } // namespace test |
| 221 } // namespace mojo | 221 } // namespace mojo |
| OLD | NEW |