summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js')
-rw-r--r--testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js b/testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js
new file mode 100644
index 0000000000..99a9c2a464
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/style-src/resources/style-src-inject-style.js
@@ -0,0 +1,5 @@
+document.write("<style>#content { margin-left: 2px; }</style>");
+
+var s = document.createElement('style');
+s.innerText = "#content { margin-right: 2px; }";
+document.getElementsByTagName('body')[0].appendChild(s);