Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 const DUMMY_PAGE = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
9 function test() {
10 waitForExplicitFinish();
12 let tab = gBrowser.addTab();
13 gBrowser.selectedTab = tab;
15 load(tab, DUMMY_PAGE, function() {
16 gFindBar.onFindCommand();
17 EventUtils.sendString("Dummy");
18 gBrowser.removeTab(tab);
20 try {
21 gFindBar.close();
22 ok(true, "findbar.close should not throw an exception");
23 } catch(e) {
24 ok(false, "findbar.close threw exception: " + e);
25 }
26 finish();
27 });
28 }
30 function load(aTab, aUrl, aCallback) {
31 aTab.linkedBrowser.addEventListener("load", function onload(aEvent) {
32 aEvent.currentTarget.removeEventListener("load", onload, true);
33 waitForFocus(aCallback, content);
34 }, true);
35 aTab.linkedBrowser.loadURI(aUrl);
36 }