summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js')
-rw-r--r--testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js b/testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js
new file mode 100644
index 0000000000..d0e9d203dd
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/reporting/support/throw-function.js
@@ -0,0 +1,9 @@
+function throw_function() {
+ throw new Error("an error");
+}
+
+function load_image() {
+ let img = document.createElement('img');
+ document.body.append(img);
+ img.src = "/xhr/resources/img.jpg"
+}