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 "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "mojo/message_pump/message_pump_mojo.h" | 10 #include "mojo/message_pump/message_pump_mojo.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 EXPECT_EQ(std::string("hello"), value); | 159 EXPECT_EQ(std::string("hello"), value); |
160 } | 160 } |
161 | 161 |
162 TEST_F(RequestResponseTest, EchoEnum) { | 162 TEST_F(RequestResponseTest, EchoEnum) { |
163 sample::ProviderPtr provider; | 163 sample::ProviderPtr provider; |
164 ProviderImpl provider_impl(GetProxy(&provider)); | 164 ProviderImpl provider_impl(GetProxy(&provider)); |
165 | 165 |
166 sample::Enum value; | 166 sample::Enum value; |
167 base::RunLoop run_loop; | 167 base::RunLoop run_loop; |
168 provider->EchoEnum(sample::ENUM_VALUE, | 168 provider->EchoEnum(sample::Enum::VALUE, |
169 EnumRecorder(&value, run_loop.QuitClosure())); | 169 EnumRecorder(&value, run_loop.QuitClosure())); |
170 | 170 |
171 run_loop.Run(); | 171 run_loop.Run(); |
172 | 172 |
173 EXPECT_EQ(sample::ENUM_VALUE, value); | 173 EXPECT_EQ(sample::Enum::VALUE, value); |
174 } | 174 } |
175 | 175 |
176 } // namespace | 176 } // namespace |
177 } // namespace test | 177 } // namespace test |
178 } // namespace mojo | 178 } // namespace mojo |
OLD | NEW |