mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
|
var gTestTab;
|
||
|
|
||
|
function test() {
|
||
|
waitForExplicitFinish();
|
||
|
|
||
|
is(getTopWin(), window, "got top window");
|
||
|
is(getBoolPref("general.startup.browser", false), true, "getBoolPref");
|
||
|
is(getBoolPref("this.pref.doesnt.exist", true), true, "getBoolPref fallback");
|
||
|
is(getBoolPref("this.pref.doesnt.exist", false), false, "getBoolPref fallback #2");
|
||
|
|
||
|
|
||
|
gTestTab = openNewTabWith("http://example.com");
|
||
|
gBrowser.selectedTab = gTestTab;
|
||
|
gTestTab.linkedBrowser.addEventListener("load", function () {
|
||
|
gTestTab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||
|
|
||
|
is(gTestTab.linkedBrowser.currentURI.spec, "http://example.com/", "example.com loaded");
|
||
|
|
||
|
test_openUILink();
|
||
|
}, true);
|
||
|
}
|
||
|
|
||
|
function test_openUILink() {
|
||
|
gTestTab.linkedBrowser.addEventListener("load", function () {
|
||
|
gTestTab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||
|
|
||
|
is(gTestTab.linkedBrowser.currentURI.spec, "http://example.org/", "example.org loaded");
|
||
|
|
||
|
gBrowser.removeTab(gTestTab);
|
||
|
finish();
|
||
|
}, true);
|
||
|
|
||
|
//openUILink(url, e, ignoreButton, ignoreAlt, allowKeywordFixup, postData, referrerUrl);
|
||
|
openUILink("http://example.org"); // defaults to "current"
|
||
|
}
|