summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-06 14:31:20 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-06 14:31:20 +0200
commit4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005 (patch)
treeea479247696202858d088702ecd85b4163c4750a /testing
parent7d5f95a8e57de5255ad2767342c1f2392b6f261f (diff)
downloaduxp-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.tar.gz
moebius#231: Consider blocking top level window data: URIs (tests)
https://github.com/MoonchildProductions/moebius/pull/231
Diffstat (limited to 'testing')
-rw-r--r--testing/talos/talos/test.py1
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-1.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-1.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002.html2
7 files changed, 13 insertions, 4 deletions
diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py
index 0de9f19bb3..dc1306b8ed 100644
--- a/testing/talos/talos/test.py
+++ b/testing/talos/talos/test.py
@@ -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()
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-1.html b/testing/web-platform/tests/websockets/unload-a-document/001-1.html
index 214246b2ee..926a68a065 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/001-1.html
@@ -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>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-2.html b/testing/web-platform/tests/websockets/unload-a-document/001-2.html
new file mode 100644
index 0000000000..24c419ce18
--- /dev/null
+++ b/testing/web-platform/tests/websockets/unload-a-document/001-2.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<title>WebSockets: navigating top-level browsing context</title>
+<body onload="history.back()"></body>
+</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html
index d949b6eba0..56e883c649 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/001.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/001.html
@@ -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>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-1.html b/testing/web-platform/tests/websockets/unload-a-document/002-1.html
index 86a852b101..52f188fa48 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/002-1.html
@@ -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>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-2.html b/testing/web-platform/tests/websockets/unload-a-document/002-2.html
new file mode 100644
index 0000000000..9a246a1dd8
--- /dev/null
+++ b/testing/web-platform/tests/websockets/unload-a-document/002-2.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<title>WebSockets: navigating top-level browsing context with closed websocket</title>
+<body onload="history.back()"></body>
+</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html
index df35192d6a..03764c345e 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/002.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/002.html
@@ -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>