| Index: chrome/browser/ui/webui/options/browser_options_browsertest.js
|
| diff --git a/chrome/browser/ui/webui/options/browser_options_browsertest.js b/chrome/browser/ui/webui/options/browser_options_browsertest.js
|
| index c9055dd15c1193a316403a6cfbc517ba5fb76b06..004535cad04205f33dd136a05edd37d982869ecf 100644
|
| --- a/chrome/browser/ui/webui/options/browser_options_browsertest.js
|
| +++ b/chrome/browser/ui/webui/options/browser_options_browsertest.js
|
| @@ -41,12 +41,29 @@ BrowserOptionsOverlayWebUITest.prototype = {
|
|
|
| /** @override */
|
| browsePreload: 'chrome://chrome/settings/autofill',
|
| +
|
| + /** @override */
|
| + isAsync: true,
|
| };
|
|
|
| TEST_F('BrowserOptionsOverlayWebUITest', 'testNavigationInBackground',
|
| function() {
|
| assertEquals(this.browsePreload, document.location.href);
|
| - expectTrue($('navigation').classList.contains('background'));
|
| +
|
| + if ($('navigation').classList.contains('background')) {
|
| + testDone();
|
| + return;
|
| + }
|
| +
|
| + // Wait for the message to be posted to the Uber page.
|
| + window.addEventListener('message', function(e) {
|
| + if (e.data.method == 'beginInterceptingEvents') {
|
| + window.setTimeout(function() {
|
| + assertTrue($('navigation').classList.contains('background'));
|
| + testDone();
|
| + });
|
| + }
|
| + });
|
| });
|
|
|
| /**
|
|
|