mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 1278306 - Remove all uses of 'content.location = ' in the webconsole tests; r=bgrins
This commit is contained in:
parent
fa87aab90d
commit
c4cfe0699b
@ -42,7 +42,7 @@ add_task(function* () {
|
||||
yield waitForMessages(msgForLocation1);
|
||||
|
||||
// load second url
|
||||
content.location = TEST_URI2;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI2);
|
||||
yield loadBrowser(gBrowser.selectedBrowser);
|
||||
|
||||
is(hud.outputNode.textContent.indexOf("Permission denied"), -1,
|
||||
|
@ -56,7 +56,7 @@ function loadDocument(browser) {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
deferred.resolve();
|
||||
}, true);
|
||||
content.location = TEST_PATH;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_PATH);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ add_task(function* () {
|
||||
expectUncaughtException();
|
||||
}
|
||||
|
||||
content.location = TEST_URI;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI);
|
||||
|
||||
yield waitForMessages({
|
||||
webconsole: hud,
|
||||
|
@ -28,7 +28,7 @@ add_task(function* () {
|
||||
hud.jsterm.clearOutput();
|
||||
|
||||
let loaded = loadBrowser(browser);
|
||||
content.location = uri.spec;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, uri.spec);
|
||||
yield loaded;
|
||||
|
||||
yield testMessages();
|
||||
|
@ -179,7 +179,7 @@ function testNext() {
|
||||
startNextTest();
|
||||
}, true);
|
||||
|
||||
content.location = testLocation;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, testLocation);
|
||||
} else {
|
||||
testEnded = true;
|
||||
finishTest();
|
||||
|
@ -37,7 +37,7 @@ function consoleOpened(hud) {
|
||||
deferred.resolve();
|
||||
}
|
||||
};
|
||||
content.location = TEST_URI2;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI2);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ add_task(function* () {
|
||||
expectUncaughtException();
|
||||
}
|
||||
|
||||
content.location = TEST_URI;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI);
|
||||
yield loaded;
|
||||
|
||||
yield testWebDevLimits();
|
||||
|
@ -104,6 +104,6 @@ function test() {
|
||||
waitForFocus(createDocument, content);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html;charset=utf-8,test for highlighter " +
|
||||
"helper in web console";
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser,
|
||||
"data:text/html;charset=utf-8,test for highlighter helper in web console");
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ add_task(function* () {
|
||||
});
|
||||
|
||||
var testMixedContent = Task.async(function* (hud) {
|
||||
content.location = TEST_HTTPS_URI;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_HTTPS_URI);
|
||||
|
||||
let results = yield waitForMessages({
|
||||
webconsole: hud,
|
||||
|
@ -23,7 +23,7 @@ add_task(function* () {
|
||||
hud.jsterm.clearOutput();
|
||||
|
||||
let loaded = loadBrowser(browser);
|
||||
content.location = TEST_VIOLATION;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_VIOLATION);
|
||||
yield loaded;
|
||||
|
||||
yield waitForSuccess({
|
||||
|
@ -50,10 +50,10 @@ function runTestLoop(theHud) {
|
||||
if (gCurrentTest.pref) {
|
||||
SpecialPowers.pushPrefEnv({"set": gCurrentTest.pref},
|
||||
function () {
|
||||
content.location = gCurrentTest.url;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, gCurrentTest.url);
|
||||
});
|
||||
} else {
|
||||
content.location = gCurrentTest.url;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, gCurrentTest.url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ function test() {
|
||||
const {tab} = yield loadTab("data:text/html;charset=utf8,<p>hello</p>");
|
||||
const hud = yield openConsole(tab);
|
||||
|
||||
content.location = TEST_PAGE_URI;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_PAGE_URI);
|
||||
|
||||
let messages = yield waitForMessages({
|
||||
webconsole: hud,
|
||||
|
@ -66,7 +66,7 @@ add_task(function* () {
|
||||
function* checkForMessage(curTest, hud) {
|
||||
hud.jsterm.clearOutput();
|
||||
|
||||
content.location = curTest.url;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, curTest.url);
|
||||
|
||||
let results = yield waitForMessages({
|
||||
webconsole: hud,
|
||||
|
@ -26,7 +26,7 @@ add_task(function* () {
|
||||
HUDService.lastFinishedRequest.callback = request => requests.push(request);
|
||||
|
||||
let loaded = loadBrowser(browser);
|
||||
content.location = TEST_FILE_URI;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_FILE_URI);
|
||||
yield loaded;
|
||||
|
||||
yield testMessages();
|
||||
|
@ -56,7 +56,7 @@ function loadDocument(browser) {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
deferred.resolve();
|
||||
}, true);
|
||||
content.location = TEST_PATH;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_PATH);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ add_task(function* () {
|
||||
if (!Services.appinfo.browserTabsRemoteAutostart) {
|
||||
expectUncaughtException();
|
||||
}
|
||||
content.location = "data:text/html;charset=utf8,<script>'use strict';function f(a, a) {};</script>";
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "data:text/html;charset="
|
||||
+ "utf8,<script>'use strict';function f(a, a) {};</script>");
|
||||
|
||||
yield waitForMessages({
|
||||
webconsole: hud,
|
||||
@ -47,7 +48,8 @@ add_task(function* () {
|
||||
if (!Services.appinfo.browserTabsRemoteAutostart) {
|
||||
expectUncaughtException();
|
||||
}
|
||||
content.location = "data:text/html;charset=utf8,<script>'use strict';var o = {get p() {}};o.p = 1;</script>";
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "data:text/html;charset="
|
||||
+ "utf8,<script>'use strict';var o = {get p() {}};o.p = 1;</script>");
|
||||
|
||||
yield waitForMessages({
|
||||
webconsole: hud,
|
||||
@ -63,7 +65,8 @@ add_task(function* () {
|
||||
if (!Services.appinfo.browserTabsRemoteAutostart) {
|
||||
expectUncaughtException();
|
||||
}
|
||||
content.location = "data:text/html;charset=utf8,<script>'use strict';v = 1;</script>";
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser,
|
||||
"data:text/html;charset=utf8,<script>'use strict';v = 1;</script>");
|
||||
|
||||
yield waitForMessages({
|
||||
webconsole: hud,
|
||||
|
Loading…
x
Reference in New Issue
Block a user