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

Unified Diff: mojo/apps/js/bindings/sample_service_unittests.js

Issue 317073005: Mojom: Add 'default' keyword for initializing structs to non-null value. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/tests/sample_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/bindings/sample_service_unittests.js
diff --git a/mojo/apps/js/bindings/sample_service_unittests.js b/mojo/apps/js/bindings/sample_service_unittests.js
index ef607f83c63034e1f0959452b8f49c0c9aff2417..c01ddee8bb2c281055ebd8257ad4cfc26bdc2643 100644
--- a/mojo/apps/js/bindings/sample_service_unittests.js
+++ b/mojo/apps/js/bindings/sample_service_unittests.js
@@ -123,7 +123,9 @@ define([
expect(defaults.a17).toBe(1.23E-20);
expect(defaults.a20).toBe(sample.Bar.Type.TYPE_BOTH);
expect(defaults.a21).toBeNull();
- expect(defaults.a22).toBeNull();
+ expect(defaults.a22).toBeTruthy();
+ expect(defaults.a22.shape).toBe(imported.Shape.SHAPE_RECTANGLE);
+ expect(defaults.a22.color).toBe(imported2.Color.COLOR_BLACK);
// TODO(vtl): crbug.com/375845
// expect(defaults.a21).toBeNull();
// expect(defaults.a22).toBeNull();
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/tests/sample_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698