mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
moebius#226: Consider blocking top level window data: URIs (part 2/2 without tests)
https://github.com/MoonchildProductions/moebius/pull/226
This commit is contained in:
parent
712d19e1b7
commit
73f89fe562
16 changed files with 194 additions and 66 deletions
|
|
@ -21,16 +21,12 @@ function test1() {
|
|||
// simple data: URI click navigation should be prevented
|
||||
let TEST_FILE = "file_block_toplevel_data_navigation.html";
|
||||
let win1 = window.open(TEST_FILE);
|
||||
var readyStateCheckInterval = setInterval(function() {
|
||||
let state = win1.document.readyState;
|
||||
if (state === "interactive" || state === "complete") {
|
||||
clearInterval(readyStateCheckInterval);
|
||||
ok(win1.document.body.innerHTML.indexOf("test1:") !== -1,
|
||||
"toplevel data: URI navigation through click() should be blocked");
|
||||
win1.close();
|
||||
test2();
|
||||
}
|
||||
}, 200);
|
||||
setTimeout(function () {
|
||||
ok(SpecialPowers.wrap(win1).document.body.innerHTML.indexOf("test1:") !== -1,
|
||||
"toplevel data: URI navigation through click() should be blocked");
|
||||
win1.close();
|
||||
test2();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function test2() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue