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 <algorithm> | 5 #include <algorithm> |
6 #include <ostream> | 6 #include <ostream> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h" | 9 #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 if (g_dump_message_as_text) { | 269 if (g_dump_message_as_text) { |
270 // Also dump the Foo structure and all of its members. | 270 // Also dump the Foo structure and all of its members. |
271 std::cout << "Frobinate:" << std::endl; | 271 std::cout << "Frobinate:" << std::endl; |
272 int depth = 1; | 272 int depth = 1; |
273 Print(depth, "foo", foo); | 273 Print(depth, "foo", foo); |
274 Print(depth, "baz", baz); | 274 Print(depth, "baz", baz); |
275 Print(depth, "port", port.get()); | 275 Print(depth, "port", port.get()); |
276 } | 276 } |
277 } | 277 } |
| 278 |
| 279 virtual void GetPort(mojo::InterfaceRequest<Port> port_request) |
| 280 MOJO_OVERRIDE { |
| 281 } |
278 }; | 282 }; |
279 | 283 |
280 class ServiceProxyImpl : public ServiceProxy { | 284 class ServiceProxyImpl : public ServiceProxy { |
281 public: | 285 public: |
282 explicit ServiceProxyImpl(mojo::MessageReceiverWithResponder* receiver) | 286 explicit ServiceProxyImpl(mojo::MessageReceiverWithResponder* receiver) |
283 : ServiceProxy(receiver) { | 287 : ServiceProxy(receiver) { |
284 } | 288 } |
285 }; | 289 }; |
286 | 290 |
287 class SimpleMessageReceiver : public mojo::MessageReceiverWithResponder { | 291 class SimpleMessageReceiver : public mojo::MessageReceiverWithResponder { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 EXPECT_DOUBLE_EQ(1E10, full->a15); | 357 EXPECT_DOUBLE_EQ(1E10, full->a15); |
354 EXPECT_DOUBLE_EQ(-1.2E+20, full->a16); | 358 EXPECT_DOUBLE_EQ(-1.2E+20, full->a16); |
355 EXPECT_DOUBLE_EQ(1.23E-20, full->a17); | 359 EXPECT_DOUBLE_EQ(1.23E-20, full->a17); |
356 EXPECT_TRUE(full->a18.is_null()); | 360 EXPECT_TRUE(full->a18.is_null()); |
357 EXPECT_TRUE(full->a19.is_null()); | 361 EXPECT_TRUE(full->a19.is_null()); |
358 EXPECT_TRUE(full->a20.is_null()); | 362 EXPECT_TRUE(full->a20.is_null()); |
359 } | 363 } |
360 | 364 |
361 } // namespace | 365 } // namespace |
362 } // namespace sample | 366 } // namespace sample |
OLD | NEW |