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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 // In the receiving process, an implementation of ServiceStub is known to | 289 // In the receiving process, an implementation of ServiceStub is known to |
290 // the system. It receives the incoming message. | 290 // the system. It receives the incoming message. |
291 ServiceImpl impl; | 291 ServiceImpl impl; |
292 | 292 |
293 ServiceStub<> stub; | 293 ServiceStub<> stub; |
294 stub.set_sink(&impl); | 294 stub.set_sink(&impl); |
295 return stub.Accept(message); | 295 return stub.Accept(message); |
296 } | 296 } |
297 | 297 |
298 bool AcceptWithResponder(mojo::Message* message, | 298 bool AcceptWithResponder( |
299 mojo::MessageReceiver* responder) override { | 299 mojo::Message* message, |
| 300 std::unique_ptr<mojo::MessageReceiver> responder) override { |
300 return false; | 301 return false; |
301 } | 302 } |
302 }; | 303 }; |
303 | 304 |
304 using BindingsSampleTest = testing::Test; | 305 using BindingsSampleTest = testing::Test; |
305 | 306 |
306 TEST_F(BindingsSampleTest, Basic) { | 307 TEST_F(BindingsSampleTest, Basic) { |
307 SimpleMessageReceiver receiver; | 308 SimpleMessageReceiver receiver; |
308 | 309 |
309 // User has a proxy to a Service somehow. | 310 // User has a proxy to a Service somehow. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 ASSERT_FALSE(defaults->a22.is_null()); | 353 ASSERT_FALSE(defaults->a22.is_null()); |
353 EXPECT_EQ(imported::Shape::RECTANGLE, defaults->a22->shape); | 354 EXPECT_EQ(imported::Shape::RECTANGLE, defaults->a22->shape); |
354 EXPECT_EQ(imported::Color::BLACK, defaults->a22->color); | 355 EXPECT_EQ(imported::Color::BLACK, defaults->a22->color); |
355 EXPECT_EQ(0xFFFFFFFFFFFFFFFFULL, defaults->a23); | 356 EXPECT_EQ(0xFFFFFFFFFFFFFFFFULL, defaults->a23); |
356 EXPECT_EQ(0x123456789, defaults->a24); | 357 EXPECT_EQ(0x123456789, defaults->a24); |
357 EXPECT_EQ(-0x123456789, defaults->a25); | 358 EXPECT_EQ(-0x123456789, defaults->a25); |
358 } | 359 } |
359 | 360 |
360 } // namespace | 361 } // namespace |
361 } // namespace sample | 362 } // namespace sample |
OLD | NEW |