Index: mojo/public/bindings/sample/sample_service_unittests.js |
diff --git a/mojo/public/bindings/sample/sample_service_unittests.js b/mojo/public/bindings/sample/sample_service_unittests.js |
index b518deb8db4e91d343fa5a12a84ffc2f69a442d8..1a8400a3652f976217511c7eb4400a3898140d09 100644 |
--- a/mojo/public/bindings/sample/sample_service_unittests.js |
+++ b/mojo/public/bindings/sample/sample_service_unittests.js |
@@ -85,6 +85,16 @@ define([ |
expect(foo.source).toBe(0xFFFF); |
} |
+ // Check that values are set to the defaults if we don't override them. |
+ function checkDefaultValues() { |
+ var bar = new sample.Bar(); |
+ expect(bar.alpha).toBe(255); |
+ |
+ var foo = new sample.Foo(); |
+ expect(foo.name).toBe("Fooby"); |
+ expect(foo.a).toBeTruthy(); |
+ } |
+ |
function ServiceImpl() { |
} |
@@ -111,6 +121,8 @@ define([ |
var receiver = new SimpleMessageReceiver(); |
var serviceProxy = new sample.ServiceProxy(receiver); |
+ checkDefaultValues(); |
+ |
var foo = makeFoo(); |
checkFoo(foo); |