| Index: chrome/test/data/local_ntp_browsertest.js
|
| diff --git a/chrome/test/data/local_ntp_browsertest.js b/chrome/test/data/local_ntp_browsertest.js
|
| index bb33e34723b31565c1c0e50d3d98153131c9c2c1..f16fc95f3ebf68c612fd34b1f3241e30c2300c1f 100644
|
| --- a/chrome/test/data/local_ntp_browsertest.js
|
| +++ b/chrome/test/data/local_ntp_browsertest.js
|
| @@ -139,7 +139,18 @@ function testMostVisitedContents() {
|
| // Advanced tests are controlled from the native side. The helpers here are
|
| // called from native code to set up the page and to check results.
|
|
|
| -function setupAdvancedTest() {
|
| +function handlePostMessage(event) {
|
| + if (event.data.cmd == 'loaded') {
|
| + domAutomationController.setAutomationId(0);
|
| + domAutomationController.send('loaded');
|
| + }
|
| +}
|
| +
|
| +function setupAdvancedTest(opt_waitForIframeLoaded) {
|
| + if (opt_waitForIframeLoaded) {
|
| + window.addEventListener('message', handlePostMessage);
|
| + }
|
| +
|
| setUp();
|
| initLocalNTP(/*isGooglePage=*/true);
|
|
|
|
|