Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: chrome/browser/ui/webui/options/browser_options_browsertest.js

Issue 476573002: Speculative fix for BrowserOptionsOverlayWebUITest.testNavigationInBackground (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d052975c645ba061eb27a78f018acf88005ee374 100644
--- a/chrome/browser/ui/webui/options/browser_options_browsertest.js
+++ b/chrome/browser/ui/webui/options/browser_options_browsertest.js
@@ -41,12 +41,28 @@ 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'));
+
+ // Speculative fix for 403627.
Evan Stade 2014/08/14 17:10:02 this comment should read: wait for the message to
michaelpg 2014/08/14 23:02:52 Done.
+ if (!$('navigation').classList.contains('background')) {
Evan Stade 2014/08/14 17:10:02 nit: if ($('navigation').classList.contains('back
michaelpg 2014/08/14 23:02:52 Done.
+ window.addEventListener('message', function(e) {
+ if (e.data.method == 'beginInterceptingEvents') {
+ window.setTimeout(function() {
+ assertTrue($('navigation').classList.contains('background'));
+ testDone();
+ });
+ }
+ });
+ } else {
+ testDone();
+ }
});
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698