summaryrefslogtreecommitdiffstats
path: root/dom/xslt/tests/mochitest/file_bug1729517_2.xml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /dom/xslt/tests/mochitest/file_bug1729517_2.xml
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/xslt/tests/mochitest/file_bug1729517_2.xml')
-rw-r--r--dom/xslt/tests/mochitest/file_bug1729517_2.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/dom/xslt/tests/mochitest/file_bug1729517_2.xml b/dom/xslt/tests/mochitest/file_bug1729517_2.xml
new file mode 100644
index 0000000000..5d706e7a05
--- /dev/null
+++ b/dom/xslt/tests/mochitest/file_bug1729517_2.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="#stylesheet"?>
+<!DOCTYPE root [
+ <!ATTLIST xsl:stylesheet id ID #IMPLIED>
+]>
+<root>
+ <xsl:stylesheet id="stylesheet" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>[]</title>
+ <script type="text/javascript">
+ async function checkCOEPAndReferrer() {
+ let results = new Map();
+
+ let win = window.open();
+ result = win.fetch("https://example.org/tests/dom/xslt/tests/mochitest/bug1729517_2.sjs", { mode: "no-cors" }).then(() => {
+ return "FAIL";
+ }, () => {
+ return "PASS";
+ });
+ results.set("Cross-Origin-Embedder-Policy", await result);
+ win.close();
+
+ result = fetch("bug1729517_2.sjs").then((response) => {
+ return response.text();
+ });
+ results.set("Referrer-Policy", await result || "FAIL");
+
+ window.opener.postMessage(results, "*");
+ }
+ </script>
+ </head>
+ <body onload="checkCOEPAndReferrer()" />
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
+</root>