diff --git a/.eslintrc.js b/.eslintrc.js index 320cacfcb1fc..de903f0036b2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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", diff --git a/docshell/test/chrome/test_docRedirect.sjs b/docshell/test/chrome/test_docRedirect.sjs index 76b7dcee589f..4050eb06d76b 100644 --- a/docshell/test/chrome/test_docRedirect.sjs +++ b/docshell/test/chrome/test_docRedirect.sjs @@ -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!"); } diff --git a/docshell/test/chrome/test_docRedirect.xhtml b/docshell/test/chrome/test_docRedirect.xhtml index ffd5c32ebb88..1688d9823ef3 100644 --- a/docshell/test/chrome/test_docRedirect.xhtml +++ b/docshell/test/chrome/test_docRedirect.xhtml @@ -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" ]]> diff --git a/docshell/test/mochitest/test_bug1645781.html b/docshell/test/mochitest/test_bug1645781.html index 07bc55996a36..6cf676b7a935 100644 --- a/docshell/test/mochitest/test_bug1645781.html +++ b/docshell/test/mochitest/test_bug1645781.html @@ -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"; diff --git a/docshell/test/mochitest/test_bug529119-2.html b/docshell/test/mochitest/test_bug529119-2.html index 840a69bb75bf..a8bd57d4f7eb 100644 --- a/docshell/test/mochitest/test_bug529119-2.html +++ b/docshell/test/mochitest/test_bug529119-2.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; diff --git a/docshell/test/mochitest/test_bug634834.html b/docshell/test/mochitest/test_bug634834.html index 4c706eeec062..e1f87de000c0 100644 --- a/docshell/test/mochitest/test_bug634834.html +++ b/docshell/test/mochitest/test_bug634834.html @@ -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. diff --git a/docshell/test/mochitest/test_double_submit.html b/docshell/test/mochitest/test_double_submit.html index aa1596fabfeb..640930718de7 100644 --- a/docshell/test/mochitest/test_double_submit.html +++ b/docshell/test/mochitest/test_double_submit.html @@ -15,6 +15,7 @@ diff --git a/docshell/test/navigation/test_opener.html b/docshell/test/navigation/test_opener.html index 3a21e2f52b15..ce966b897dc7 100644 --- a/docshell/test/navigation/test_opener.html +++ b/docshell/test/navigation/test_opener.html @@ -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"); diff --git a/docshell/test/navigation/test_recursive_frames.html b/docshell/test/navigation/test_recursive_frames.html index 0090f74c1905..3ccc09dd14c4 100644 --- a/docshell/test/navigation/test_recursive_frames.html +++ b/docshell/test/navigation/test_recursive_frames.html @@ -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", diff --git a/docshell/test/navigation/test_triggeringprincipal_frame_nav.html b/docshell/test/navigation/test_triggeringprincipal_frame_nav.html index 47752ae03fdf..d7046e92367b 100644 --- a/docshell/test/navigation/test_triggeringprincipal_frame_nav.html +++ b/docshell/test/navigation/test_triggeringprincipal_frame_nav.html @@ -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; diff --git a/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html b/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html index b9790cd0fa55..4483efb13efe 100644 --- a/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html +++ b/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html @@ -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"); }