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

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

Issue 164873002: Fix bug with using enums as default values in mojom. We were previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « mojo/public/bindings/tests/sample_service.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/environment/environment.h" 10 #include "mojo/public/environment/environment.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 EXPECT_EQ("Bob", full.people()[0].names()[0].To<std::string>()); 336 EXPECT_EQ("Bob", full.people()[0].names()[0].To<std::string>());
337 EXPECT_EQ("Bobby", full.people()[0].names()[1].To<std::string>()); 337 EXPECT_EQ("Bobby", full.people()[0].names()[1].To<std::string>());
338 EXPECT_EQ(6*12, full.people()[0].height()); 338 EXPECT_EQ(6*12, full.people()[0].height());
339 339
340 EXPECT_EQ(7, full.point().x()); 340 EXPECT_EQ(7, full.point().x());
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_RECTANGLE, full.thing().shape()); 346 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape());
347 EXPECT_EQ(imported::COLOR_RED, 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/sample_service.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698