fune/browser/base/content/test/general/browser_findbarClose.js
Jared Wein 624f411ee0 Bug 1314474 - Enable no-shadow rule for eslint for browser/ mochitests. r=mossop
MozReview-Commit-ID: 3EQOeDSnmVz

--HG--
extra : rebase_source : 44fa6cb7fbd383b1294344f545126515518a2018
2016-11-04 17:11:52 -04:00

35 lines
1 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Tests find bar auto-close behavior
var newTab;
add_task(function* findbar_test() {
waitForExplicitFinish();
newTab = gBrowser.addTab("about:blank");
let promise = ContentTask.spawn(newTab.linkedBrowser, null, function* () {
yield ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", false);
});
newTab.linkedBrowser.loadURI("http://example.com/browser/" +
"browser/base/content/test/general/test_bug628179.html");
yield promise;
gFindBar.open();
yield new ContentTask.spawn(newTab.linkedBrowser, null, function* () {
let iframe = content.document.getElementById("iframe");
let awaitLoad = ContentTaskUtils.waitForEvent(iframe, "load", false);
iframe.src = "http://example.org/";
yield awaitLoad;
});
ok(!gFindBar.hidden, "the Find bar isn't hidden after the location of a " +
"subdocument changes");
gFindBar.close();
gBrowser.removeTab(newTab);
finish();
});