summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html')
-rw-r--r--testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html
new file mode 100644
index 0000000000..d247797603
--- /dev/null
+++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Node.appendChild: inserting script and meta-referrer from a div</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+promise_test(async t => {
+ const script = document.createElement("script");
+ const meta = document.createElement("meta");
+ meta.name = "referrer";
+ meta.content = "no-referrer";
+ const fragment = new DocumentFragment();
+ const done = new Promise(resolve => {
+ window.didFetch = resolve;
+ });
+ script.textContent = `
+ (async function() {
+ const response = await fetch("/html/infrastructure/urls/terminology-0/resources/echo-referrer-text.py")
+ const text = await response.text();
+ window.didFetch(text);
+ })();
+ `;
+ fragment.append(script, meta);
+ document.head.append(fragment);
+ const result = await done;
+ assert_equals(result, "");
+}, "<meta name=referrer> should apply before script, as it is an insertion step " +
+ "and not a post-insertion step");
+</script>