summaryrefslogtreecommitdiffstats
path: root/mojo/apps
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-03 21:40:29 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-03 21:40:29 +0000
commitfdb5371f601fe0c76c657f638ff1b29bb676e320 (patch)
tree7ca2bc35a73e7c6864c0ff4ac6adbc71b0b22db7 /mojo/apps
parentabc08b6c6c8d5a48b79263a85a7abc5ee47c7ea1 (diff)
downloadchromium_src-fdb5371f601fe0c76c657f638ff1b29bb676e320.zip
chromium_src-fdb5371f601fe0c76c657f638ff1b29bb676e320.tar.gz
chromium_src-fdb5371f601fe0c76c657f638ff1b29bb676e320.tar.bz2
Support default values for complex objects in mojom.
BUG=320082 R=darin@chromium.org Review URL: https://codereview.chromium.org/139613005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/apps')
-rw-r--r--mojo/apps/js/bindings/sample_service_unittests.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/mojo/apps/js/bindings/sample_service_unittests.js b/mojo/apps/js/bindings/sample_service_unittests.js
index 9b9165d..6e438b3 100644
--- a/mojo/apps/js/bindings/sample_service_unittests.js
+++ b/mojo/apps/js/bindings/sample_service_unittests.js
@@ -98,6 +98,19 @@ define([
expect(foo.data[0]).toBe(1);
expect(foo.data[1]).toBe(2);
expect(foo.data[2]).toBe(3);
+
+ var inner = new sample.DefaultsTestInner();
+ expect(inner.names.length).toBe(1);
+ expect(inner.names[0]).toBe("Jim");
+ expect(inner.height).toBe(6*12);
+
+ var full = new sample.DefaultsTest();
+ expect(full.people.length).toBe(1);
+ expect(full.people[0].age).toBe(32);
+ expect(full.people[0].names.length).toBe(2);
+ expect(full.people[0].names[0]).toBe("Bob");
+ expect(full.people[0].names[1]).toBe("Bobby");
+ expect(full.people[0].height).toBe(6*12);
}
function ServiceImpl() {