2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-09-22 05:55:08 -07:00
|
|
|
|
|
|
|
function test() {
|
|
|
|
let newTab = gBrowser.addTab("http://example.com");
|
|
|
|
waitForExplicitFinish();
|
|
|
|
newTab.linkedBrowser.addEventListener("load", mainPart, true);
|
2011-12-19 16:17:08 -08:00
|
|
|
|
2010-09-22 05:55:08 -07:00
|
|
|
function mainPart() {
|
2011-06-07 07:45:26 -07:00
|
|
|
newTab.linkedBrowser.removeEventListener("load", mainPart, true);
|
|
|
|
|
2010-09-22 05:55:08 -07:00
|
|
|
gBrowser.pinTab(newTab);
|
|
|
|
gBrowser.selectedTab = newTab;
|
2011-12-19 16:17:08 -08:00
|
|
|
|
|
|
|
openUILinkIn("http://example.org/", "current", { inBackground: true });
|
2010-09-22 05:55:08 -07:00
|
|
|
isnot(gBrowser.selectedTab, newTab, "shouldn't load in background");
|
2011-12-19 16:17:08 -08:00
|
|
|
|
2010-09-22 05:55:08 -07:00
|
|
|
gBrowser.removeTab(newTab);
|
|
|
|
gBrowser.removeTab(gBrowser.tabs[1]); // example.org tab
|
|
|
|
finish();
|
|
|
|
}
|
|
|
|
}
|