From 87fa7a4805bc9cb9e3b19662002fbbd8c4e2aef2 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Sat, 18 Dec 2021 11:28:06 +0000 Subject: [PATCH] Bug 1729517 - Set up document correctly - test. r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D127982 --- dom/xslt/tests/mochitest/bug1729517_2.sjs | 3 ++ dom/xslt/tests/mochitest/file_bug1729517.js | 3 ++ dom/xslt/tests/mochitest/file_bug1729517.xml | 31 ++++++++++++ .../tests/mochitest/file_bug1729517_2.xml | 38 +++++++++++++++ .../mochitest/file_bug1729517_2.xml^headers^ | 2 + dom/xslt/tests/mochitest/mochitest.ini | 7 +++ dom/xslt/tests/mochitest/test_bug1729517.html | 48 +++++++++++++++++++ 7 files changed, 132 insertions(+) create mode 100644 dom/xslt/tests/mochitest/bug1729517_2.sjs create mode 100644 dom/xslt/tests/mochitest/file_bug1729517.js create mode 100644 dom/xslt/tests/mochitest/file_bug1729517.xml create mode 100644 dom/xslt/tests/mochitest/file_bug1729517_2.xml create mode 100644 dom/xslt/tests/mochitest/file_bug1729517_2.xml^headers^ create mode 100644 dom/xslt/tests/mochitest/test_bug1729517.html diff --git a/dom/xslt/tests/mochitest/bug1729517_2.sjs b/dom/xslt/tests/mochitest/bug1729517_2.sjs new file mode 100644 index 000000000000..2537a971b094 --- /dev/null +++ b/dom/xslt/tests/mochitest/bug1729517_2.sjs @@ -0,0 +1,3 @@ +function handleRequest(request, response) { + response.write(request.hasHeader("Referer") ? "FAIL" : "PASS"); +} diff --git a/dom/xslt/tests/mochitest/file_bug1729517.js b/dom/xslt/tests/mochitest/file_bug1729517.js new file mode 100644 index 000000000000..559a52aa030c --- /dev/null +++ b/dom/xslt/tests/mochitest/file_bug1729517.js @@ -0,0 +1,3 @@ +fail( + "documents sandboxed without allow-scripts should NOT be able to run + + + + + + + diff --git a/dom/xslt/tests/mochitest/file_bug1729517_2.xml^headers^ b/dom/xslt/tests/mochitest/file_bug1729517_2.xml^headers^ new file mode 100644 index 000000000000..6c83b8d686d6 --- /dev/null +++ b/dom/xslt/tests/mochitest/file_bug1729517_2.xml^headers^ @@ -0,0 +1,2 @@ +Referrer-Policy: no-referrer +Cross-Origin-Embedder-Policy: require-corp diff --git a/dom/xslt/tests/mochitest/mochitest.ini b/dom/xslt/tests/mochitest/mochitest.ini index 1e74c705a2d3..e09053fbc093 100644 --- a/dom/xslt/tests/mochitest/mochitest.ini +++ b/dom/xslt/tests/mochitest/mochitest.ini @@ -18,6 +18,13 @@ support-files = file_bug1135764.xml file_bug1135764.xsl [test_bug1436040.html] [test_bug1527308.html] +[test_bug1729517.html] +support-files = + bug1729517_2.sjs + file_bug1729517.xml + file_bug1729517.js + file_bug1729517_2.xml + file_bug1729517_2.xml^headers^ [test_exslt.html] [test_parameter.html] [test_sorting_invalid_lang.html] diff --git a/dom/xslt/tests/mochitest/test_bug1729517.html b/dom/xslt/tests/mochitest/test_bug1729517.html new file mode 100644 index 000000000000..062d832d98ba --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug1729517.html @@ -0,0 +1,48 @@ + + + + + <!-- TODO: insert title here --> + + + + + +

+ + +

+
+