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

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

Issue 177183002: Mojo: Include "path/to/foo.mojom.h" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary abspath Created 6 years, 9 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/bindings/allocation_scope.h" 9 #include "mojo/public/bindings/allocation_scope.h"
10 #include "mojo/public/bindings/tests/sample_service.mojom.h"
10 #include "mojo/public/environment/environment.h" 11 #include "mojo/public/environment/environment.h"
11 #include "mojom/sample_service.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 template <> 16 template <>
17 class TypeConverter<sample::Bar, int32_t> { 17 class TypeConverter<sample::Bar, int32_t> {
18 public: 18 public:
19 static int32_t ConvertTo(const sample::Bar& bar) { 19 static int32_t ConvertTo(const sample::Bar& bar) {
20 return static_cast<int32_t>(bar.alpha()) << 16 | 20 return static_cast<int32_t>(bar.alpha()) << 16 |
21 static_cast<int32_t>(bar.beta()) << 8 | 21 static_cast<int32_t>(bar.beta()) << 8 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 EXPECT_EQ(15, full.point().y()); 341 EXPECT_EQ(15, full.point().y());
342 342
343 EXPECT_EQ(1u, full.shape_masks().size()); 343 EXPECT_EQ(1u, full.shape_masks().size());
344 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]); 344 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]);
345 345
346 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape()); 346 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape());
347 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color()); 347 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color());
348 } 348 }
349 349
350 } // namespace sample 350 } // namespace sample
OLDNEW
« no previous file with comments | « mojo/public/bindings/tests/remote_ptr_unittest.cc ('k') | mojo/public/bindings/tests/type_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698