Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: mojo/public/cpp/bindings/tests/sample_service_unittest.cc

Issue 272323003: Mojo: Implement support for |Foo&| mojom syntax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698