From e454783943bc1e233134023e004c0a821891e178 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Mon, 13 May 2019 20:20:58 +0000 Subject: [PATCH] Bug 1548385: Test CSP blocks scripts correctly within template. r=jkt Differential Revision: https://phabricator.services.mozilla.com/D30480 --HG-- extra : moz-landing-system : lando --- .../test/csp/file_script_template.html | 16 +++++ dom/security/test/csp/file_script_template.js | 1 + dom/security/test/csp/mochitest.ini | 4 ++ .../test/csp/test_script_template.html | 60 +++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 dom/security/test/csp/file_script_template.html create mode 100644 dom/security/test/csp/file_script_template.js create mode 100644 dom/security/test/csp/test_script_template.html diff --git a/dom/security/test/csp/file_script_template.html b/dom/security/test/csp/file_script_template.html new file mode 100644 index 000000000000..381959291298 --- /dev/null +++ b/dom/security/test/csp/file_script_template.html @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/dom/security/test/csp/file_script_template.js b/dom/security/test/csp/file_script_template.js new file mode 100644 index 000000000000..d75869f76380 --- /dev/null +++ b/dom/security/test/csp/file_script_template.js @@ -0,0 +1 @@ +// dummy *.js file diff --git a/dom/security/test/csp/mochitest.ini b/dom/security/test/csp/mochitest.ini index bf1173ac9f2d..5234bc64fd61 100644 --- a/dom/security/test/csp/mochitest.ini +++ b/dom/security/test/csp/mochitest.ini @@ -375,3 +375,7 @@ support-files = file_windowwatcher_subframeC.html file_windowwatcher_subframeD.html file_windowwatcher_win_open.html +[test_script_template.html] +support-files = + file_script_template.html + file_script_template.js diff --git a/dom/security/test/csp/test_script_template.html b/dom/security/test/csp/test_script_template.html new file mode 100644 index 000000000000..39cd5ff18a75 --- /dev/null +++ b/dom/security/test/csp/test_script_template.html @@ -0,0 +1,60 @@ + + + + Bug 1548385 - CSP: Test script template + + + + + + + + +