moebius#231: Consider blocking top level window data: URIs (tests)

https://github.com/MoonchildProductions/moebius/pull/231
This commit is contained in:
janekptacijarabaci 2018-05-06 14:31:20 +02:00 • committed by Roy Tam
commit 745e1809b0
63 changed files with 157 additions and 83 deletions

View file

@ -194,6 +194,7 @@ class tpaint(TsBase):
tpmozafterpaint = True
filters = filter.ignore_first.prepare(5) + filter.median.prepare()
unit = 'ms'
preferences = {'security.data_uri.block_toplevel_data_uri_navigations': False}
@register_test()

View file

@ -22,7 +22,7 @@ t.step(function() {
}), 1000);
controller.navigate();
})
ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)});
ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
}
});
</script>

View file

@ -0,0 +1,4 @@
<!doctype html>
<title>WebSockets: navigating top-level browsing context</title>
<body onload="history.back()"></body>
</html>

View file

@ -20,6 +20,6 @@ t.step(function() {
});
});
navigate = t.step_func(function() {
w.location = 'data:text/html,<body onload="history.back()">';
w.location = w.location.href.replace("001-1.html", "001-2.html");
});
</script>

View file

@ -28,7 +28,7 @@ t.step(function() {
controller.navigate();
});
})
ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)});
ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
}
});
</script>

View file

@ -0,0 +1,4 @@
<!doctype html>
<title>WebSockets: navigating top-level browsing context with closed websocket</title>
<body onload="history.back()"></body>
</html>

View file

@ -21,6 +21,6 @@ t.step(function() {
});
});
navigate = t.step_func(function() {
w.location = 'data:text/html,<body onload="history.back()">';
w.location = w.location.href.replace("002-1.html", "002-2.html");
});
</script>