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 <stdint.h> | 5 #include <stdint.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/message_pump/message_pump_mojo.h" | 9 #include "mojo/message_pump/message_pump_mojo.h" |
10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ReadTextMessage(pipe2.handle0.get(), &value); | 136 ReadTextMessage(pipe2.handle0.get(), &value); |
137 | 137 |
138 EXPECT_EQ(std::string("hello"), value); | 138 EXPECT_EQ(std::string("hello"), value); |
139 } | 139 } |
140 | 140 |
141 TEST_F(RequestResponseTest, EchoEnum) { | 141 TEST_F(RequestResponseTest, EchoEnum) { |
142 sample::ProviderPtr provider; | 142 sample::ProviderPtr provider; |
143 ProviderImpl provider_impl(GetProxy(&provider)); | 143 ProviderImpl provider_impl(GetProxy(&provider)); |
144 | 144 |
145 sample::Enum value; | 145 sample::Enum value; |
146 provider->EchoEnum(sample::ENUM_VALUE, EnumRecorder(&value)); | 146 provider->EchoEnum(sample::Enum::VALUE, EnumRecorder(&value)); |
147 | 147 |
148 PumpMessages(); | 148 PumpMessages(); |
149 | 149 |
150 EXPECT_EQ(sample::ENUM_VALUE, value); | 150 EXPECT_EQ(sample::Enum::VALUE, value); |
151 } | 151 } |
152 | 152 |
153 } // namespace | 153 } // namespace |
154 } // namespace test | 154 } // namespace test |
155 } // namespace mojo | 155 } // namespace mojo |
OLD | NEW |