| Index: extensions/test/data/mojo_private_unittest.js
|
| diff --git a/extensions/test/data/mojo_private_unittest.js b/extensions/test/data/mojo_private_unittest.js
|
| index 2a90d6509240d2cda449aa21a6633784efe43a0b..f66b997d4cba11e76b08b8106780af6028825653 100644
|
| --- a/extensions/test/data/mojo_private_unittest.js
|
| +++ b/extensions/test/data/mojo_private_unittest.js
|
| @@ -31,4 +31,24 @@ unittestBindings.exportTests([
|
| mojoPrivate.define('testModule', ['does not exist!'], test.fail);
|
| test.succeed();
|
| },
|
| +
|
| + function testRequireAsync() {
|
| + mojoPrivate.requireAsync('mojo/public/js/codec').then(
|
| + test.callbackPass(function(codec) {
|
| + test.assertEq('function', typeof codec.Message);
|
| + }));
|
| + },
|
| +
|
| + function testDefineAndRequire() {
|
| + mojoPrivate.define('testModule', ['dependency'],
|
| + test.callbackPass(function(module) {
|
| + test.assertEq(12345, module.result);
|
| + }));
|
| + mojoPrivate.define('dependency', test.callbackPass(function() {
|
| + return {result: 12345};
|
| + }));
|
| + mojoPrivate.requireAsync('dependency').then(
|
| + test.callbackPass(),
|
| + test.fail);
|
| + }
|
| ], test.runTests, exports);
|
|
|