| Index: third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
|
| diff --git a/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html b/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
|
| index 5a869ba479eef205659fa40576a5852405fbdf2f..41f062278ae081b4e43822698414c2c90f6b5559 100644
|
| --- a/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
|
| +++ b/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
|
| @@ -11,6 +11,7 @@ mojo_test(mojo => {
|
| assert_true(mojo instanceof Object);
|
| assert_true(mojo.core instanceof Object);
|
| assert_true(mojo.router instanceof Object);
|
| + assert_true(mojo.frameServiceRegistry instanceof Object);
|
| assert_true(mojo.serviceRegistry instanceof Object);
|
| }, 'Mojo system APIs should be available to layout tests.');
|
|
|
| @@ -18,6 +19,22 @@ mojo_test(mojo => {
|
| return new Promise(resolve => {
|
| let calls = 0;
|
| // Complete the test as soon as two requests come in for a Frobinator service.
|
| + mojo.frameServiceRegistry.addServiceOverrideForTesting('Frobinator', () => {
|
| + if (++calls == 2)
|
| + resolve();
|
| + });
|
| +
|
| + // Try to connect to the browser's Frobinator service. This should be
|
| + // intercepted by the above override.
|
| + mojo.frameServiceRegistry.connectToService('Frobinator');
|
| + mojo.frameServiceRegistry.connectToService('Frobinator');
|
| + });
|
| +}, 'Frame service registry overrides should be properly intercepted.');
|
| +
|
| +mojo_test(mojo => {
|
| + return new Promise(resolve => {
|
| + let calls = 0;
|
| + // Complete the test as soon as two requests come in for a Frobinator service.
|
| mojo.serviceRegistry.addServiceOverrideForTesting('Frobinator', () => {
|
| if (++calls == 2)
|
| resolve();
|
|
|