Bug 1802505 - Add disable next line for all docshell/test/mochitest and docshell/test/chrome r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D164229
This commit is contained in:
lyavor 2022-12-29 12:24:15 +00:00
Родитель a7a1533b7c
Коммит a1593f002b
20 изменённых файлов: 50 добавлений и 22 удалений

Просмотреть файл

@ -1409,28 +1409,6 @@ module.exports = {
"devtools/shared/commands/resource/tests/browser_resources_sources.js",
"devtools/shared/commands/target/tests/browser_target_command_bfcache.js",
"devtools/shared/test-helpers/browser_allocation_tracker.js",
"docshell/test/chrome/bug113934_window.xhtml",
"docshell/test/chrome/bug449778_window.xhtml",
"docshell/test/chrome/bug449780_window.xhtml",
"docshell/test/chrome/test_docRedirect.sjs",
"docshell/test/chrome/test_docRedirect.xhtml",
"docshell/test/mochitest/test_bug1645781.html",
"docshell/test/mochitest/test_bug529119-2.html",
"docshell/test/mochitest/test_bug634834.html",
"docshell/test/mochitest/test_double_submit.html",
"docshell/test/mochitest/test_iframe_srcdoc_to_remote.html",
"docshell/test/mochitest/test_navigate_after_pagehide.html",
"docshell/test/mochitest/test_redirect_history.html",
"docshell/test/mochitest/test_triggeringprincipal_location_seturi.html",
"docshell/test/navigation/browser_test_simultaneous_normal_and_history_loads.js",
"docshell/test/navigation/file_bug1706090.html",
"docshell/test/navigation/test_bug13871.html",
"docshell/test/navigation/test_bug1699721.html",
"docshell/test/navigation/test_not-opener.html",
"docshell/test/navigation/test_opener.html",
"docshell/test/navigation/test_recursive_frames.html",
"docshell/test/navigation/test_triggeringprincipal_frame_nav.html",
"docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html",
"dom/animation/test/document-timeline/test_document-timeline.html",
"dom/animation/test/mozilla/file_restyles.html",
"dom/base/test/browser_aboutnewtab_process_selection.js",

Просмотреть файл

@ -1,5 +1,6 @@
function handleRequest(request, response) {
response.setStatusLine(request.httpVersion, 301, "Moved Permanently");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
response.setHeader("Location", "http://example.org/");
response.write("Hello world!");
}

Просмотреть файл

@ -78,6 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1342989
});
var win = docShell.contentViewer.DOMDocument.defaultView;
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
win.location = "http://example.com/chrome/docshell/test/chrome/test_docRedirect.sjs"
]]>

Просмотреть файл

@ -15,6 +15,7 @@
"use strict";
const PATH = "/tests/docshell/test/mochitest/";
const SAME_ORIGIN = new URL(PATH, window.location.origin);;
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
const CROSS_ORIGIN_1 = new URL(PATH, "http://test1.example.com/");
const CROSS_ORIGIN_2 = new URL(PATH, "https://example.com/");
const TARGET = "ping.html";

Просмотреть файл

@ -11,6 +11,7 @@ SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.test/";
var w = null;

Просмотреть файл

@ -23,6 +23,7 @@ function iframe_loaded() {
var obj = { name: "name" };
obj.__defineGetter__("a", function() {
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
$("iframe").contentWindow.location = "http://example.com";
// Wait until we've loaded example.com.

Просмотреть файл

@ -15,6 +15,7 @@
<script>
"use strict";
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
const CROSS_ORIGIN_URI = "http://test1.example.com/tests/docshell/test/mochitest/ping.html";
function asyncClick(counts) {

Просмотреть файл

@ -19,6 +19,7 @@
await new Promise(r => {
frame.onload = r;
document.body.appendChild(frame);
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
frame.contentWindow.location = "http://example.net/tests/docshell/test/dummy_page.html";
});
if (SpecialPowers.useRemoteSubframes) {

Просмотреть файл

@ -18,6 +18,7 @@ add_task(async function() {
location.href = "/";
})`);
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
iframe.src = "http://example.com/";
await new Promise(resolve =>
iframe.addEventListener("load", resolve, { once: true })

Просмотреть файл

@ -14,6 +14,7 @@
let tests = new Map([
["sameorigin", window.location.origin],
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
["crossorigin", "http://test1.example.com"],
]);
for (let [kind, origin] of tests) {

Просмотреть файл

@ -11,6 +11,7 @@
SimpleTest.waitForExplicitFinish();
const SAME_ORIGIN_URI = "http://mochi.test:8888/tests/docshell/test/dummy_page.html";
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
const CROSS_ORIGIN_URI = "http://example.com/tests/docshell/test/dummy_page.html";
const NUMBER_OF_TESTS = 3;
let testCounter = 0;

Просмотреть файл

@ -13,6 +13,7 @@ add_task(async function test_normal_and_history_loads() {
let testPage =
getRootDirectory(gTestPath).replace(
"chrome://mochitests/content",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com"
) + "blank.html";
await BrowserTestUtils.withNewTab({ gBrowser, url: testPage }, async function(

Просмотреть файл

@ -26,6 +26,7 @@
location.href = "https://example.com:443" + location.pathname;
} else if (event.data == "sameSite") {
bc.close();
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
location.href = "http://test1.mochi.test:8888" + location.pathname;
}
}

Просмотреть файл

@ -47,9 +47,13 @@ addEventListener("message", function windowLoaded(evt) {
}
});
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/parent.html", "window0", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/parent.html", "window1", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/parent.html", "window2", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/parent.html", "window3", "width=10,height=10");
function waitForLoad(w) {

Просмотреть файл

@ -17,6 +17,7 @@
info("popup blank.html loaded");
let tell_opener = new URL("file_tell_opener.html", location.href);
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
let xorigin_url = new URL(tell_opener.pathname, "http://example.com");
let resolveStartedUnload;

Просмотреть файл

@ -37,8 +37,11 @@ window.onload = async function() {
};
// opener0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window0", "_blank", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
let opener1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window1", "_blank", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
let opener2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window2", "_blank", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
let opener3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window3", "_blank", "width=10,height=10");
</script>
</head>

Просмотреть файл

@ -35,9 +35,13 @@ window.onload = async function() {
SimpleTest.finish();
};
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window0", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window1", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window2", "width=10,height=10");
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
var window3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window3", "width=10,height=10");
</script>
</head>

Просмотреть файл

@ -18,7 +18,9 @@
{ // too many recursive iframes
frameId: "recursiveFrame",
expectedLocations: [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_recursive.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_recursive.html",
"about:blank",
],
@ -26,9 +28,13 @@
{ // too many recursive iframes
frameId: "twoRecursiveIframes",
expectedLocations: [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_load_as_example_com.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.org/tests/docshell/test/navigation/frame_load_as_example_org.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_load_as_example_com.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.org/tests/docshell/test/navigation/frame_load_as_example_org.html",
"about:blank",
],
@ -36,11 +42,17 @@
{ // too many recursive iframes
frameId: "threeRecursiveIframes",
expectedLocations: [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub1.test1.mochi.test:8888/tests/docshell/test/navigation/frame_load_as_host1.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_load_as_host2.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://test1.mochi.test:8888/tests/docshell/test/navigation/frame_load_as_host3.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub1.test1.mochi.test:8888/tests/docshell/test/navigation/frame_load_as_host1.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_load_as_host2.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://test1.mochi.test:8888/tests/docshell/test/navigation/frame_load_as_host3.html",
"about:blank",
],
@ -48,20 +60,30 @@
{ // too many nested iframes
frameId: "sixRecursiveIframes",
expectedLocations: [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_1_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://test1.mochi.test:8888/tests/docshell/test/navigation/frame_2_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub1.test1.mochi.test:8888/tests/docshell/test/navigation/frame_3_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub2.xn--lt-uia.mochi.test:8888/tests/docshell/test/navigation/frame_4_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://test2.mochi.test:8888/tests/docshell/test/navigation/frame_5_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.org/tests/docshell/test/navigation/frame_6_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/frame_1_out_of_6.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://test1.mochi.test:8888/tests/docshell/test/navigation/frame_2_out_of_6.html",
],
},
{ // too many recursive objects
frameId: "recursiveObject",
expectedLocations: [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub2.xn--lt-uia.mochi.test:8888/tests/docshell/test/navigation/object_recursive_load.html",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://sub2.xn--lt-uia.mochi.test:8888/tests/docshell/test/navigation/object_recursive_load.html",
],
},
@ -69,6 +91,7 @@
frameId: "nestedSrcdoc",
expectedLocations: [
"about:srcdoc",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com/tests/docshell/test/navigation/file_nested_srcdoc.html",
"about:srcdoc",
"about:srcdoc",

Просмотреть файл

@ -37,7 +37,9 @@
* ==> test2.mochi.test
*/
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
const BASEDOMAIN1 = "http://test1.mochi.test:8888/";
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
const BASEDOMAIN2 = "http://test2.mochi.test:8888/";
const PATH = "tests/docshell/test/navigation/";
const BASEURL1 = BASEDOMAIN1 + PATH;

Просмотреть файл

@ -49,6 +49,7 @@ function receiveMessage(event) {
function performNavigation() {
testframe.removeEventListener("load", performNavigation);
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
testframe.setAttribute("src", "http://example.com/tests/docshell/test/navigation/file_triggeringprincipal_subframe_same_origin_nav.html");
}