forked from mirrors/gecko-dev
Bug 1858673 - Remove now unnecessary disabling of ESLint no-unsanitized/* rules from test files. r=freddyb,media-playback-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,places-reviewers,aosmond,sgalich,dao,padenot
Differential Revision: https://phabricator.services.mozilla.com/D190985
This commit is contained in:
parent
79b35cfc1b
commit
31a45737c0
74 changed files with 3 additions and 92 deletions
|
|
@ -50,7 +50,6 @@ addAccessibleTask(
|
||||||
var shadow = component.attachShadow({mode: "open"});
|
var shadow = component.attachShadow({mode: "open"});
|
||||||
for (var child = component.firstChild; child; child = child.nextSibling) {
|
for (var child = component.firstChild; child; child = child.nextSibling) {
|
||||||
if (child.nodeType === 8)
|
if (child.nodeType === 8)
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
shadow.innerHTML = child.data;
|
shadow.innerHTML = child.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
var shadow = component.attachShadow({mode: "open"});
|
var shadow = component.attachShadow({mode: "open"});
|
||||||
for (var child = component.firstChild; child; child = child.nextSibling) {
|
for (var child = component.firstChild; child; child = child.nextSibling) {
|
||||||
if (child.nodeType === 8)
|
if (child.nodeType === 8)
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
shadow.innerHTML = child.data;
|
shadow.innerHTML = child.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ async function initChildFrames(browser, insertHTML) {
|
||||||
root.insertBefore(pre, root.firstChild);
|
root.insertBefore(pre, root.firstChild);
|
||||||
|
|
||||||
if (insertHTMLChild) {
|
if (insertHTMLChild) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.getElementById("insertPoint").innerHTML =
|
content.document.getElementById("insertPoint").innerHTML =
|
||||||
insertHTMLChild;
|
insertHTMLChild;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ async function doTest(
|
||||||
// Add the link for the child tab to the page.
|
// Add the link for the child tab to the page.
|
||||||
let mainDiv = content.document.createElement("div");
|
let mainDiv = content.document.createElement("div");
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
mainDiv.innerHTML =
|
mainDiv.innerHTML =
|
||||||
'<p><a id="linkToOpenInNewTab" href="' +
|
'<p><a id="linkToOpenInNewTab" href="' +
|
||||||
childTabSpecContent +
|
childTabSpecContent +
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
|
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
|
||||||
|
|
||||||
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http font";
|
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http font";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("testDiv").innerHTML = newValue;
|
document.getElementById("testDiv").innerHTML = newValue;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
var newValue = "Verifying MCB does not trigger warning/error for an http page ";
|
var newValue = "Verifying MCB does not trigger warning/error for an http page ";
|
||||||
newValue += "with https css that imports another http css which includes http font";
|
newValue += "with https css that imports another http css which includes http font";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("testDiv").innerHTML = newValue;
|
document.getElementById("testDiv").innerHTML = newValue;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
|
is(blockedMixedDisplay, false, "OK: Should not block mixed display content!");
|
||||||
|
|
||||||
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http image";
|
var newValue = "Verifying MCB does not trigger warning/error for an http page with https css that includes http image";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("testDiv").innerHTML = newValue;
|
document.getElementById("testDiv").innerHTML = newValue;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
function message(m) {
|
function message(m) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("message").innerHTML += `${m}<br>`;
|
document.getElementById("message").innerHTML += `${m}<br>`;
|
||||||
top.postMessage(m, "*");
|
top.postMessage(m, "*");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
function message(m) {
|
function message(m) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("message").innerHTML += `${m}<br>`;
|
document.getElementById("message").innerHTML += `${m}<br>`;
|
||||||
top.postMessage(m, "*");
|
top.postMessage(m, "*");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
function message(m) {
|
function message(m) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("message").innerHTML += `${m}<br>`;
|
document.getElementById("message").innerHTML += `${m}<br>`;
|
||||||
window.top.postMessage(m, "*");
|
window.top.postMessage(m, "*");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
function message(m) {
|
function message(m) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("message").innerHTML += `${m}<br>`;
|
document.getElementById("message").innerHTML += `${m}<br>`;
|
||||||
window.parent.postMessage(m, "*");
|
window.parent.postMessage(m, "*");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ async function getResultFromSharedworker(aBrowser) {
|
||||||
|
|
||||||
let result = await new content.Promise(resolve => {
|
let result = await new content.Promise(resolve => {
|
||||||
worker.port.onmessage = function (e) {
|
worker.port.onmessage = function (e) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.getElementById("display").innerHTML = e.data;
|
content.document.getElementById("display").innerHTML = e.data;
|
||||||
resolve(e.data);
|
resolve(e.data);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
let bc = new BroadcastChannel("testBroadcastChannel");
|
let bc = new BroadcastChannel("testBroadcastChannel");
|
||||||
bc.onmessage = function(e) {
|
bc.onmessage = function(e) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("display").innerHTML = e.data;
|
document.getElementById("display").innerHTML = e.data;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
Hi, I was opened via a <script>
|
Hi, I was opened via a <script>
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write(location.search ?
|
document.write(location.search ?
|
||||||
"popup call from the opened window... uh oh, that shouldn't happen!" :
|
"popup call from the opened window... uh oh, that shouldn't happen!" :
|
||||||
"bookmarklet, and I will open a new window myself.");</script><br>
|
"bookmarklet, and I will open a new window myself.");</script><br>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
result.oscpu = navigator.oscpu;
|
result.oscpu = navigator.oscpu;
|
||||||
result.hardwareConcurrency = navigator.hardwareConcurrency;
|
result.hardwareConcurrency = navigator.hardwareConcurrency;
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("result").innerHTML = JSON.stringify(result);
|
document.getElementById("result").innerHTML = JSON.stringify(result);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ function test() {
|
||||||
tab.linkedBrowser.removeEventListener("load", listener, true);
|
tab.linkedBrowser.removeEventListener("load", listener, true);
|
||||||
|
|
||||||
let iframes = tab.linkedBrowser.contentWindow.frames;
|
let iframes = tab.linkedBrowser.contentWindow.frames;
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
iframes[1].document.body.innerHTML = uniqueValue;
|
iframes[1].document.body.innerHTML = uniqueValue;
|
||||||
|
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ add_task(async function test_save_doorhanger_not_shown() {
|
||||||
|
|
||||||
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = doc;
|
content.document.body.innerHTML = doc;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ add_task(async function test_save_doorhanger_tel_concatenated() {
|
||||||
{ gBrowser, url: EMPTY_URL },
|
{ gBrowser, url: EMPTY_URL },
|
||||||
async function (browser) {
|
async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [MARKUP], doc => {
|
await SpecialPowers.spawn(browser, [MARKUP], doc => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = doc;
|
content.document.body.innerHTML = doc;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ add_task(async function test_save_doorhanger_not_shown() {
|
||||||
|
|
||||||
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = doc;
|
content.document.body.innerHTML = doc;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ add_task(async function test_heuristics() {
|
||||||
|
|
||||||
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = doc;
|
content.document.body.innerHTML = doc;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,6 @@ add_task(async function test_save_doorhanger_click_save() {
|
||||||
let onChanged = waitForStorageChangedEvents("add");
|
let onChanged = waitForStorageChangedEvents("add");
|
||||||
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
await BrowserTestUtils.withNewTab(EMPTY_URL, async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
await SpecialPowers.spawn(browser, [TEST.document], doc => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = doc;
|
content.document.body.innerHTML = doc;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
const output = document.getElementById("output");
|
const output = document.getElementById("output");
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
output.innerHTML = msg;
|
output.innerHTML = msg;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
const output = document.getElementById("output");
|
const output = document.getElementById("output");
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
output.innerHTML = msg;
|
output.innerHTML = msg;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ const html = `
|
||||||
</head>
|
</head>
|
||||||
`;
|
`;
|
||||||
onload = function() {
|
onload = function() {
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write(html);
|
document.write(html);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ add_task(async function () {
|
||||||
console.log(new Map([[null, rtlOverride + "msg07"]]));
|
console.log(new Map([[null, rtlOverride + "msg07"]]));
|
||||||
|
|
||||||
const parser = content.document.createElement("div");
|
const parser = content.document.createElement("div");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
parser.innerHTML = `
|
parser.innerHTML = `
|
||||||
<div data-test="${rtlOverride}msg08"></div>
|
<div data-test="${rtlOverride}msg08"></div>
|
||||||
<div data-${rtlOverride}="msg09"></div>
|
<div data-${rtlOverride}="msg09"></div>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ Test that css-logic calculates CSS specificity properly
|
||||||
function createDocument() {
|
function createDocument() {
|
||||||
let text = TEST_DATA.map(i=>i.text).join(",");
|
let text = TEST_DATA.map(i=>i.text).join(",");
|
||||||
text = '<style>' + text + " {color:red;}</style>";
|
text = '<style>' + text + " {color:red;}</style>";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.body.innerHTML = text;
|
document.body.innerHTML = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
// Import all the test cases
|
// Import all the test cases
|
||||||
const tests =
|
const tests =
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
(await Promise.all(testFiles.map(f => import(f).then(data => data.default)))).flat();
|
(await Promise.all(testFiles.map(f => import(f).then(data => data.default)))).flat();
|
||||||
|
|
||||||
for (const {
|
for (const {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
window.onpagehide = null;
|
window.onpagehide = null;
|
||||||
pageHideAsserts = {};
|
pageHideAsserts = {};
|
||||||
pageHideAsserts.persisted = event.persisted;
|
pageHideAsserts.persisted = event.persisted;
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
pageHideAsserts.innerHTML = window.document.body.innerHTML;
|
pageHideAsserts.innerHTML = window.document.body.innerHTML;
|
||||||
};
|
};
|
||||||
window.location.href = msg.testUrl2;
|
window.location.href = msg.testUrl2;
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
}
|
}
|
||||||
window.onpageshow = function(e) {
|
window.onpageshow = function(e) {
|
||||||
var msg = {command: "child1PageShow", persisted: e.persisted, pageHideAsserts};
|
var msg = {command: "child1PageShow", persisted: e.persisted, pageHideAsserts};
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
msg.innerHTML = window.document.body.innerHTML;
|
msg.innerHTML = window.document.body.innerHTML;
|
||||||
bc.postMessage(msg);
|
bc.postMessage(msg);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
function addMetaRefresh() {
|
function addMetaRefresh() {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.head.innerHTML = "<meta http-equiv='refresh' content='5; url=" +
|
document.head.innerHTML = "<meta http-equiv='refresh' content='5; url=" +
|
||||||
location.href.replace("?initial", "?refresh") + "'>";
|
location.href.replace("?initial", "?refresh") + "'>";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
var src = window.location.hash.substring(1);
|
var src = window.location.hash.substring(1);
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write('<iframe src="' + src + '"></iframe>');
|
document.write('<iframe src="' + src + '"></iframe>');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
var args = window.location.hash.substring(1).split(",");
|
var args = window.location.hash.substring(1).split(",");
|
||||||
var target = args[0];
|
var target = args[0];
|
||||||
var mechanism = args[1];
|
var mechanism = args[1];
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write("target=" + target + " mechanism=" + mechanism);
|
document.write("target=" + target + " mechanism=" + mechanism);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
var target = window.location.hash.substring(1);
|
var target = window.location.hash.substring(1);
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write("target=" + target);
|
document.write("target=" + target);
|
||||||
window.open("navigation_target_popup_url.html", target, "width=10,height=10");
|
window.open("navigation_target_popup_url.html", target, "width=10,height=10");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,8 @@ function testChild0() {
|
||||||
if (!window.window0) {
|
if (!window.window0) {
|
||||||
window0 = window.open("", "window0", "width=10,height=10");
|
window0 = window.open("", "window0", "width=10,height=10");
|
||||||
window0.document.open();
|
window0.document.open();
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window0.document.write(headerHTML);
|
window0.document.write(headerHTML);
|
||||||
window0.document.write("<script>navigateByLocation(opener.frames[0])<\/script>");
|
window0.document.write("<script>navigateByLocation(opener.frames[0])<\/script>");
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window0.document.write(footerHTML);
|
window0.document.write(footerHTML);
|
||||||
window0.document.close();
|
window0.document.close();
|
||||||
}
|
}
|
||||||
|
|
@ -34,10 +32,8 @@ function testChild1() {
|
||||||
if (!window.window1) {
|
if (!window.window1) {
|
||||||
window1 = window.open("", "window1", "width=10,height=10");
|
window1 = window.open("", "window1", "width=10,height=10");
|
||||||
window1.document.open();
|
window1.document.open();
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window1.document.write(headerHTML);
|
window1.document.write(headerHTML);
|
||||||
window1.document.write("<script>navigateByOpen('child1');<\/script>");
|
window1.document.write("<script>navigateByOpen('child1');<\/script>");
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window1.document.write(footerHTML);
|
window1.document.write(footerHTML);
|
||||||
window1.document.close();
|
window1.document.close();
|
||||||
}
|
}
|
||||||
|
|
@ -47,10 +43,8 @@ function testChild2() {
|
||||||
if (!window.window2) {
|
if (!window.window2) {
|
||||||
window2 = window.open("", "window2", "width=10,height=10");
|
window2 = window.open("", "window2", "width=10,height=10");
|
||||||
window2.document.open();
|
window2.document.open();
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window2.document.write(headerHTML);
|
window2.document.write(headerHTML);
|
||||||
window2.document.write("<script>navigateByForm('child2');<\/script>");
|
window2.document.write("<script>navigateByForm('child2');<\/script>");
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window2.document.write(footerHTML);
|
window2.document.write(footerHTML);
|
||||||
window2.document.close();
|
window2.document.close();
|
||||||
}
|
}
|
||||||
|
|
@ -60,10 +54,8 @@ function testChild3() {
|
||||||
if (!window.window3) {
|
if (!window.window3) {
|
||||||
window3 = window.open("", "window3", "width=10,height=10");
|
window3 = window.open("", "window3", "width=10,height=10");
|
||||||
window3.document.open();
|
window3.document.open();
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window3.document.write(headerHTML);
|
window3.document.write(headerHTML);
|
||||||
window3.document.write("<script>navigateByHyperlink('child3');<\/script>");
|
window3.document.write("<script>navigateByHyperlink('child3');<\/script>");
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
window3.document.write(footerHTML);
|
window3.document.write(footerHTML);
|
||||||
window3.document.close();
|
window3.document.close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createElement(name);
|
const element = document.createElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createElement(name);
|
const element = document.createElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createElement(name);
|
const element = document.createElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createXULElement(name);
|
const element = document.createXULElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createElement(name);
|
const element = document.createElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
function elem(name) {
|
function elem(name) {
|
||||||
return function(str) {
|
return function(str) {
|
||||||
const element = document.createElement(name);
|
const element = document.createElement(name);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
element.innerHTML = str;
|
element.innerHTML = str;
|
||||||
return element;
|
return element;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ const MediaSessionActions = [
|
||||||
|
|
||||||
for (const action of MediaSessionActions) {
|
for (const action of MediaSessionActions) {
|
||||||
navigator.mediaSession.setActionHandler(action, () => {
|
navigator.mediaSession.setActionHandler(action, () => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("result").innerHTML = action;
|
document.getElementById("result").innerHTML = action;
|
||||||
document.getElementById("result").dispatchEvent(new CustomEvent("actionChanged"));
|
document.getElementById("result").dispatchEvent(new CustomEvent("actionChanged"));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ function createTestArray() {
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
info(msg);
|
info(msg);
|
||||||
var l = document.getElementById('log');
|
var l = document.getElementById('log');
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
l.innerHTML += msg + "<br>";
|
l.innerHTML += msg + "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ function startTest(test, token) {
|
||||||
}
|
}
|
||||||
html += '</table>\n';
|
html += '</table>\n';
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
div.innerHTML = html;
|
div.innerHTML = html;
|
||||||
d.appendChild(div);
|
d.appendChild(div);
|
||||||
// Verify decoded tag values.
|
// Verify decoded tag values.
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ addLoadEvent(function() {gotLoadEvent=true;});
|
||||||
|
|
||||||
function log(m) {
|
function log(m) {
|
||||||
var l = document.getElementById("log");
|
var l = document.getElementById("log");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
l.innerHTML += m;
|
l.innerHTML += m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ SimpleTest.waitForExplicitFinish();
|
||||||
// 2) as DocumentFragment
|
// 2) as DocumentFragment
|
||||||
let temp = document.createElement('template');
|
let temp = document.createElement('template');
|
||||||
// asking eslint to skip this: innerHTML is safe for template elements.
|
// asking eslint to skip this: innerHTML is safe for template elements.
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
temp.innerHTML = inputStr;
|
temp.innerHTML = inputStr;
|
||||||
yield ({testInput: temp.content, testType: "DocumentFragment" });
|
yield ({testInput: temp.content, testType: "DocumentFragment" });
|
||||||
// 3) as HTMLDocument
|
// 3) as HTMLDocument
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@
|
||||||
var result = null;
|
var result = null;
|
||||||
|
|
||||||
function handlePosition(position) {
|
function handlePosition(position) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
result.innerHTML = position.coords.latitude + " " + position.coords.longitude;
|
result.innerHTML = position.coords.latitude + " " + position.coords.longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleError(error) {
|
function handleError(error) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
result.innerHTML = error.message;
|
result.innerHTML = error.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ SimpleTest.waitForFocus(async () => {
|
||||||
{
|
{
|
||||||
init: (normalSel, editingHost) => {
|
init: (normalSel, editingHost) => {
|
||||||
info("Staring to test spellcheck of misspelled word after joining paragraphs");
|
info("Staring to test spellcheck of misspelled word after joining paragraphs");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
editingHost.innerHTML = "<p>It is</p><p>what I want</p>";
|
editingHost.innerHTML = "<p>It is</p><p>what I want</p>";
|
||||||
normalSel.collapse(editingHost.querySelector("p + p").firstChild, 0);
|
normalSel.collapse(editingHost.querySelector("p + p").firstChild, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -83,7 +82,6 @@ SimpleTest.waitForFocus(async () => {
|
||||||
{
|
{
|
||||||
init: (normalSel, editingHost) => {
|
init: (normalSel, editingHost) => {
|
||||||
info("Staring to test spellcheck of correct word after joining paragraphs");
|
info("Staring to test spellcheck of correct word after joining paragraphs");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
editingHost.innerHTML = "<p>It's beco</p><p>ming nicer</p>";
|
editingHost.innerHTML = "<p>It's beco</p><p>ming nicer</p>";
|
||||||
normalSel.collapse(editingHost.querySelector("p + p").firstChild, 0);
|
normalSel.collapse(editingHost.querySelector("p + p").firstChild, 0);
|
||||||
return 2;
|
return 2;
|
||||||
|
|
@ -103,7 +101,6 @@ SimpleTest.waitForFocus(async () => {
|
||||||
{
|
{
|
||||||
init: (normalSel, editingHost) => {
|
init: (normalSel, editingHost) => {
|
||||||
info("Staring to test spellcheck of correct words after splitting a paragraph");
|
info("Staring to test spellcheck of correct words after splitting a paragraph");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
editingHost.innerHTML = "<p>It iswhat I want</p>";
|
editingHost.innerHTML = "<p>It iswhat I want</p>";
|
||||||
normalSel.collapse(editingHost.querySelector("p").firstChild, "It is".length);
|
normalSel.collapse(editingHost.querySelector("p").firstChild, "It is".length);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -123,7 +120,6 @@ SimpleTest.waitForFocus(async () => {
|
||||||
{
|
{
|
||||||
init: (normalSel, editingHost) => {
|
init: (normalSel, editingHost) => {
|
||||||
info("Staring to test spellcheck of misspelled words after splitting a paragraph");
|
info("Staring to test spellcheck of misspelled words after splitting a paragraph");
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
editingHost.innerHTML = "<p>It's becoming nicer</p>";
|
editingHost.innerHTML = "<p>It's becoming nicer</p>";
|
||||||
normalSel.collapse(editingHost.querySelector("p").firstChild, "It's beco".length);
|
normalSel.collapse(editingHost.querySelector("p").firstChild, "It's beco".length);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ function populateScroller() {
|
||||||
for (let i = 1; i < 100; i++) {
|
for (let i = 1; i < 100; i++) {
|
||||||
text += 'line ' + i + '<br>';
|
text += 'line ' + i + '<br>';
|
||||||
}
|
}
|
||||||
/* eslint-disable no-unsanitized/property */
|
|
||||||
document.querySelector('#scroller').contentDocument.body.innerHTML = text;
|
document.querySelector('#scroller').contentDocument.body.innerHTML = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ function makeFragmentTestChecker(input, expected, errors, fragment, testframe) {
|
||||||
fragment
|
fragment
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
context.innerHTML = input;
|
context.innerHTML = input;
|
||||||
var domAsString = fragmentToTestOutput(context);
|
var domAsString = fragmentToTestOutput(context);
|
||||||
is(domAsString, expected, "HTML5 expected success. " + new Date());
|
is(domAsString, expected, "HTML5 expected success. " + new Date());
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=339350
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* eslint-disable no-unsanitized/property */
|
|
||||||
var text1 = "foo bar";
|
var text1 = "foo bar";
|
||||||
var text2 = "foo [bar]";
|
var text2 = "foo [bar]";
|
||||||
var text3 = "foo {bar}";
|
var text3 = "foo {bar}";
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=460437
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
/* eslint-disable no-unsanitized/property */
|
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
||||||
SimpleTest.expectAssertions(1);
|
SimpleTest.expectAssertions(1);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ function runTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function continuation1() {
|
function continuation1() {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("content").innerHTML = initialState;
|
document.getElementById("content").innerHTML = initialState;
|
||||||
setTimeout(continuation2, 1);
|
setTimeout(continuation2, 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
document.open();
|
document.open();
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write("This is insecure XSS script " + document.cookie);
|
document.write("This is insecure XSS script " + document.cookie);
|
||||||
isSecurityState(
|
isSecurityState(
|
||||||
"broken",
|
"broken",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
This is frame 1:
|
This is frame 1:
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write(location.href);
|
document.write(location.href);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
This is frame 2:
|
This is frame 2:
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
document.write(location.href);
|
document.write(location.href);
|
||||||
</script>
|
</script>
|
||||||
<iframe src="http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/iframe.html"></iframe>
|
<iframe src="http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/iframe.html"></iframe>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ server.registerPathHandler("/script.js", (request, response) => {
|
||||||
ok(false, "Unexpected request to /script.js");
|
ok(false, "Unexpected request to /script.js");
|
||||||
});
|
});
|
||||||
|
|
||||||
/* eslint-disable no-unsanitized/method, no-eval, no-implied-eval */
|
/* eslint-disable no-eval, no-implied-eval */
|
||||||
|
|
||||||
const MODULE1 = `
|
const MODULE1 = `
|
||||||
import {foo} from "./module2.js";
|
import {foo} from "./module2.js";
|
||||||
|
|
|
||||||
|
|
@ -528,7 +528,6 @@ function testInlineCSS() {
|
||||||
// Test creating <style> element from the extension side and then appending
|
// Test creating <style> element from the extension side and then appending
|
||||||
// to it using insertAdjacentHTML, with the same rules as above.
|
// to it using insertAdjacentHTML, with the same rules as above.
|
||||||
testModifyAfterInject("insertAdjacentHTML", (style, css) => {
|
testModifyAfterInject("insertAdjacentHTML", (style, css) => {
|
||||||
// eslint-disable-next-line no-unsanitized/method
|
|
||||||
style.insertAdjacentHTML("beforeend", css);
|
style.insertAdjacentHTML("beforeend", css);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ let authPromptIsCommonDialog =
|
||||||
* and internal state for the elements are removed.
|
* and internal state for the elements are removed.
|
||||||
*/
|
*/
|
||||||
function recreateTree(element) {
|
function recreateTree(element) {
|
||||||
// eslint-disable-next-line no-unsanitized/property, no-self-assign
|
// eslint-disable-next-line no-self-assign
|
||||||
element.outerHTML = element.outerHTML;
|
element.outerHTML = element.outerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -779,7 +779,6 @@ async function loadFormIntoWindow(origin, html, win, expectedCount = 1, task) {
|
||||||
win,
|
win,
|
||||||
[html, task?.toString()],
|
[html, task?.toString()],
|
||||||
function (contentHtml, contentTask = null) {
|
function (contentHtml, contentTask = null) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
this.content.document.documentElement.innerHTML = contentHtml;
|
this.content.document.documentElement.innerHTML = contentHtml;
|
||||||
// Similar to the invokeContentTask helper in accessible/tests/browser/shared-head.js
|
// Similar to the invokeContentTask helper in accessible/tests/browser/shared-head.js
|
||||||
if (contentTask) {
|
if (contentTask) {
|
||||||
|
|
@ -980,7 +979,6 @@ function setFormAndWaitForFieldFilled(
|
||||||
form,
|
form,
|
||||||
{ fieldSelector, fieldValue, formId }
|
{ fieldSelector, fieldValue, formId }
|
||||||
) {
|
) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.querySelector("#content").innerHTML = form;
|
document.querySelector("#content").innerHTML = form;
|
||||||
return SimpleTest.promiseWaitForCondition(() => {
|
return SimpleTest.promiseWaitForCondition(() => {
|
||||||
let ancestor = formId
|
let ancestor = formId
|
||||||
|
|
@ -1107,14 +1105,12 @@ function setContentForTask(html) {
|
||||||
const content = document.querySelector("#content");
|
const content = document.querySelector("#content");
|
||||||
const innerHTMLBefore = content.innerHTML || "";
|
const innerHTMLBefore = content.innerHTML || "";
|
||||||
SimpleTest.registerCurrentTaskCleanupFunction(
|
SimpleTest.registerCurrentTaskCleanupFunction(
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
() => (content.innerHTML = innerHTMLBefore)
|
() => (content.innerHTML = innerHTMLBefore)
|
||||||
);
|
);
|
||||||
if (html.content?.cloneNode) {
|
if (html.content?.cloneNode) {
|
||||||
const clone = html.content.cloneNode(true);
|
const clone = html.content.cloneNode(true);
|
||||||
content.replaceChildren(clone);
|
content.replaceChildren(clone);
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.innerHTML = html;
|
content.innerHTML = html;
|
||||||
}
|
}
|
||||||
return content.firstElementChild;
|
return content.firstElementChild;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ Login Manager test: filling generated passwords into confirm password fields
|
||||||
|
|
||||||
await setupScript.sendAsyncMessage("resetLoginsAndGeneratedPasswords");
|
await setupScript.sendAsyncMessage("resetLoginsAndGeneratedPasswords");
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.innerHTML = html;
|
content.innerHTML = html;
|
||||||
|
|
||||||
// wait for the just created form to get autofilled
|
// wait for the just created form to get autofilled
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,8 @@ const availableLogins = {
|
||||||
|
|
||||||
async function recreateTreeInWindow(formNum) {
|
async function recreateTreeInWindow(formNum) {
|
||||||
await SpecialPowers.spawn(win, [formNum], (formNumF) => {
|
await SpecialPowers.spawn(win, [formNum], (formNumF) => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
let form = this.content.document.querySelector(`#form${formNumF}`);
|
let form = this.content.document.querySelector(`#form${formNumF}`);
|
||||||
// eslint-disable-next-line no-unsanitized/property, no-self-assign
|
// eslint-disable-next-line no-self-assign
|
||||||
form.outerHTML = form.outerHTML;
|
form.outerHTML = form.outerHTML;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,6 @@ add_task(async function test() {
|
||||||
|
|
||||||
let processedFormPromise = promiseFormsProcessedInSameProcess(numFormLikesExpected);
|
let processedFormPromise = promiseFormsProcessedInSameProcess(numFormLikesExpected);
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = tc.document;
|
frameDoc.documentElement.innerHTML = tc.document;
|
||||||
info("waiting for " + numFormLikesExpected + " processed form(s)");
|
info("waiting for " + numFormLikesExpected + " processed form(s)");
|
||||||
await processedFormPromise;
|
await processedFormPromise;
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,6 @@ async function testFormlessSubmit(tc) {
|
||||||
info("Starting testcase: " + JSON.stringify(tc));
|
info("Starting testcase: " + JSON.stringify(tc));
|
||||||
|
|
||||||
let formsProcessed = promiseFormsProcessedInSameProcess(tc.expectedFormsCount);
|
let formsProcessed = promiseFormsProcessedInSameProcess(tc.expectedFormsCount);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = tc.document;
|
frameDoc.documentElement.innerHTML = tc.document;
|
||||||
await formsProcessed;
|
await formsProcessed;
|
||||||
// We eliminate no user input as a reason for not capturing by modifying the value
|
// We eliminate no user input as a reason for not capturing by modifying the value
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,6 @@ async function testFormlesSubmitFormRemoval(tc, testDoc, scriptName) {
|
||||||
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
||||||
|
|
||||||
let formsProcessed = promiseFormsProcessed(tc.expectedFormsCount);
|
let formsProcessed = promiseFormsProcessed(tc.expectedFormsCount);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = testDoc;
|
frameDoc.documentElement.innerHTML = testDoc;
|
||||||
await formsProcessed;
|
await formsProcessed;
|
||||||
// We eliminate no user input as a reason for not capturing by modifying the value
|
// We eliminate no user input as a reason for not capturing by modifying the value
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,6 @@ async function testFormlesSubmitNavigationNegative(tc, scriptName, heuristic) {
|
||||||
|
|
||||||
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
||||||
let formsProcessed = promiseFormsProcessed();
|
let formsProcessed = promiseFormsProcessed();
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = tc.document;
|
frameDoc.documentElement.innerHTML = tc.document;
|
||||||
await formsProcessed;
|
await formsProcessed;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,6 @@ async function testFormlesSubmitNavigation(tc, testDoc, scriptName) {
|
||||||
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
||||||
|
|
||||||
let formsProcessed = promiseFormsProcessed(tc.expectedFormsCount);
|
let formsProcessed = promiseFormsProcessed(tc.expectedFormsCount);
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = testDoc;
|
frameDoc.documentElement.innerHTML = testDoc;
|
||||||
await formsProcessed;
|
await formsProcessed;
|
||||||
// We eliminate no user input as a reason for not capturing by modifying the value
|
// We eliminate no user input as a reason for not capturing by modifying the value
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,6 @@ async function testFormlesSubmitNavigationNegative(tc, scriptName) {
|
||||||
await loadedPromise;
|
await loadedPromise;
|
||||||
|
|
||||||
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
frameDoc.documentElement.innerHTML = tc.document;
|
frameDoc.documentElement.innerHTML = tc.document;
|
||||||
// We eliminate no user input as a reason for not capturing by modifying the value
|
// We eliminate no user input as a reason for not capturing by modifying the value
|
||||||
setUserInputValues(frameDoc.documentElement, tc.selectorValues);
|
setUserInputValues(frameDoc.documentElement, tc.selectorValues);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ async function reinitializeForm(index) {
|
||||||
let form = document.getElementById("form" + index);
|
let form = document.getElementById("form" + index);
|
||||||
let temp = form.innerHTML;
|
let temp = form.innerHTML;
|
||||||
form.innerHTML = "";
|
form.innerHTML = "";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
form.innerHTML = temp;
|
form.innerHTML = temp;
|
||||||
|
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ async function loadFormIntoIframe(origin, html) {
|
||||||
await loadedPromise;
|
await loadedPromise;
|
||||||
|
|
||||||
await SpecialPowers.spawn(getIframeBrowsingContext(window, 0), [html], function(contentHtml) {
|
await SpecialPowers.spawn(getIframeBrowsingContext(window, 0), [html], function(contentHtml) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
this.content.document.documentElement.innerHTML = contentHtml;
|
this.content.document.documentElement.innerHTML = contentHtml;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
let text = "";
|
let text = "";
|
||||||
for (let i = 0; i < 1000; i++) {
|
for (let i = 0; i < 1000; i++) {
|
||||||
text += "more";
|
text += "more";
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
document.getElementById("holder").innerHTML = text;
|
document.getElementById("holder").innerHTML = text;
|
||||||
}
|
}
|
||||||
document.getElementById("holder").classList.add("loaded");
|
document.getElementById("holder").classList.add("loaded");
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ async function postFrom(start, target) {
|
||||||
|
|
||||||
// Create the form element in our loaded URI.
|
// Create the form element in our loaded URI.
|
||||||
await SpecialPowers.spawn(browser, [{ target }], function ({ target }) {
|
await SpecialPowers.spawn(browser, [{ target }], function ({ target }) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = `
|
content.document.body.innerHTML = `
|
||||||
<form method="post" action="${target}">
|
<form method="post" action="${target}">
|
||||||
<input type="text" name="initialRemoteType" value="${Services.appinfo.remoteType}">
|
<input type="text" name="initialRemoteType" value="${Services.appinfo.remoteType}">
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ add_task(async function test_autoscroll_links() {
|
||||||
"https://example.com/browser/toolkit/content/tests/browser/file_empty.html",
|
"https://example.com/browser/toolkit/content/tests/browser/file_empty.html",
|
||||||
async function (browser) {
|
async function (browser) {
|
||||||
await SpecialPowers.spawn(browser, [markup], html => {
|
await SpecialPowers.spawn(browser, [markup], html => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = html;
|
content.document.body.innerHTML = html;
|
||||||
content.document.documentElement.scrollTop = 1;
|
content.document.documentElement.scrollTop = 1;
|
||||||
content.document.documentElement.scrollTop; // Flush layout.
|
content.document.documentElement.scrollTop; // Flush layout.
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ add_task(async function testStopStartingAutoScroll() {
|
||||||
aExpectedActiveElement,
|
aExpectedActiveElement,
|
||||||
}) {
|
}) {
|
||||||
await SpecialPowers.spawn(browser, [aInnerHTML], async contentHTML => {
|
await SpecialPowers.spawn(browser, [aInnerHTML], async contentHTML => {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
content.document.body.innerHTML = contentHTML;
|
content.document.body.innerHTML = contentHTML;
|
||||||
content.document.documentElement.scrollTop; // Flush layout.
|
content.document.documentElement.scrollTop; // Flush layout.
|
||||||
const iframe = content.document.querySelector("iframe");
|
const iframe = content.document.querySelector("iframe");
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,6 @@ function initAndRunTests()
|
||||||
result = readFromClipboard();
|
result = readFromClipboard();
|
||||||
ok(expect.test(result), "data on system pasteboard is wrapped with charset metadata");
|
ok(expect.test(result), "data on system pasteboard is wrapped with charset metadata");
|
||||||
|
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
$("display").innerHTML =
|
$("display").innerHTML =
|
||||||
'<em>source:</em> <pre>' + encodeHtmlEntities(source) + '</pre><br/>' +
|
'<em>source:</em> <pre>' + encodeHtmlEntities(source) + '</pre><br/>' +
|
||||||
'<em>result:</em> <pre>' + encodeHtmlEntities(result) + '</pre>';
|
'<em>result:</em> <pre>' + encodeHtmlEntities(result) + '</pre>';
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ function shouldThrowException(fun, exception) {
|
||||||
fun.call();
|
fun.call();
|
||||||
return false;
|
return false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
$("display").innerHTML += "<br/>OK thrown: "+e.message;
|
$("display").innerHTML += "<br/>OK thrown: "+e.message;
|
||||||
return (e instanceof Components.Exception &&
|
return (e instanceof Components.Exception &&
|
||||||
e.result === exception)
|
e.result === exception)
|
||||||
|
|
@ -49,7 +48,6 @@ function doesntThrowException(fun) {
|
||||||
|
|
||||||
var baseWindow = getBaseWindowInterface(this);
|
var baseWindow = getBaseWindowInterface(this);
|
||||||
var nativeHandle = baseWindow.nativeHandle;
|
var nativeHandle = baseWindow.nativeHandle;
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
$("display").innerHTML = "found nativeHandle for this window: "+nativeHandle;
|
$("display").innerHTML = "found nativeHandle for this window: "+nativeHandle;
|
||||||
|
|
||||||
var win = Services.wm.getMostRecentWindow("navigator:browser");
|
var win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||||
|
|
|
||||||
|
|
@ -10000,7 +10000,6 @@ async function runIMEContentObserverTest()
|
||||||
break;
|
break;
|
||||||
case "p":
|
case "p":
|
||||||
case "div":
|
case "div":
|
||||||
// eslint-disable-next-line no-unsanitized/property
|
|
||||||
aElement.innerHTML = "<" + aDefaultParagraphSeparator + "></" + aDefaultParagraphSeparator + ">";
|
aElement.innerHTML = "<" + aDefaultParagraphSeparator + "></" + aDefaultParagraphSeparator + ">";
|
||||||
sel.collapse(aElement.firstChild, 0);
|
sel.collapse(aElement.firstChild, 0);
|
||||||
offsetAtContainer = offsetAtStart + kLFLen;
|
offsetAtContainer = offsetAtStart + kLFLen;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue