зеркало из https://github.com/mozilla/pjs.git
tests cleanup
This commit is contained in:
Родитель
3593f39647
Коммит
d8363519bf
|
@ -8,7 +8,7 @@ function test() {
|
|||
|
||||
function onPageShow() {
|
||||
gBrowser.removeEventListener("pageshow", onPageShow, false);
|
||||
var frame = gBrowser.contentWindow.frames[0];
|
||||
var frame = content.frames[0];
|
||||
var sel = frame.getSelection();
|
||||
var range = frame.document.createRange();
|
||||
var tn = frame.document.body.childNodes[0];
|
||||
|
|
|
@ -38,7 +38,7 @@ function test() {
|
|||
is(gBrowser.mTabs.length, preTabNo + 1, "Alt+Return key added new tab");
|
||||
isnot(event.originalTarget, preSelectedBrowser.contentDocument,
|
||||
"Alt+Return key loaded results in new tab");
|
||||
is(event.originalTarget, gBrowser.selectedBrowser.contentDocument,
|
||||
is(event.originalTarget, gBrowser.contentDocument,
|
||||
"Alt+Return key loaded results in foreground tab");
|
||||
|
||||
//Shift key has no effect for now, so skip it
|
||||
|
@ -55,7 +55,7 @@ function test() {
|
|||
is(gBrowser.mTabs.length, preTabNo + 1, "Shift+Alt+Return key added new tab");
|
||||
isnot(event.originalTarget, preSelectedBrowser.contentDocument,
|
||||
"Shift+Alt+Return key loaded results in new tab");
|
||||
isnot(event.originalTarget, gBrowser.selectedBrowser.contentDocument,
|
||||
isnot(event.originalTarget, gBrowser.contentDocument,
|
||||
"Shift+Alt+Return key loaded results in background tab");
|
||||
|
||||
testLeftClick();
|
||||
|
@ -83,7 +83,7 @@ function test() {
|
|||
is(gBrowser.mTabs.length, preTabNo + 1, "MiddleClick added new tab");
|
||||
isnot(event.originalTarget, preSelectedBrowser.contentDocument,
|
||||
"MiddleClick loaded results in new tab");
|
||||
is(event.originalTarget, gBrowser.selectedBrowser.contentDocument,
|
||||
is(event.originalTarget, gBrowser.contentDocument,
|
||||
"MiddleClick loaded results in foreground tab");
|
||||
|
||||
testShiftMiddleClick();
|
||||
|
@ -98,7 +98,7 @@ function test() {
|
|||
is(gBrowser.mTabs.length, preTabNo + 1, "Shift+MiddleClick added new tab");
|
||||
isnot(event.originalTarget, preSelectedBrowser.contentDocument,
|
||||
"Shift+MiddleClick loaded results in new tab");
|
||||
isnot(event.originalTarget, gBrowser.selectedBrowser.contentDocument,
|
||||
isnot(event.originalTarget, gBrowser.contentDocument,
|
||||
"Shift+MiddleClick loaded results in background tab");
|
||||
|
||||
testRightClick();
|
||||
|
@ -107,7 +107,7 @@ function test() {
|
|||
|
||||
function testRightClick() {
|
||||
init();
|
||||
gBrowser.selectedBrowser.contentWindow.location.href = "about:blank";
|
||||
content.location.href = "about:blank";
|
||||
simulateClick({ button: 2 }, searchButton);
|
||||
setTimeout(function() {
|
||||
|
||||
|
@ -123,7 +123,7 @@ function test() {
|
|||
while (gBrowser.mTabs.length != 1) {
|
||||
gBrowser.removeTab(gBrowser.mTabs[0]);
|
||||
}
|
||||
gBrowser.selectedBrowser.contentWindow.location.href = "about:blank";
|
||||
content.location.href = "about:blank";
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ function test() {
|
|||
|
||||
is(newWin2.gBrowser.tabContainer.childNodes.length, 2,
|
||||
"The window correctly restored 2 tabs");
|
||||
is(newWin2.gBrowser.selectedBrowser.currentURI.spec, testURL,
|
||||
is(newWin2.gBrowser.currentURI.spec, testURL,
|
||||
"The window correctly restored the URL");
|
||||
|
||||
let textbox = newWin2.content.document.getElementById("textbox");
|
||||
|
|
|
@ -60,7 +60,7 @@ function test() {
|
|||
newWin.addEventListener("load", function (aEvent) {
|
||||
newWin.removeEventListener("load", arguments.callee, false);
|
||||
|
||||
newWin.gBrowser.selectedBrowser.loadURI(testURL, null, null);
|
||||
newWin.gBrowser.loadURI(testURL, null, null);
|
||||
|
||||
newWin.gBrowser.addEventListener("load", function (aEvent) {
|
||||
newWin.gBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче