summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html')
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html b/toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html
new file mode 100644
index 0000000000..ab558c4955
--- /dev/null
+++ b/toolkit/components/passwordmgr/test/mochitest/form_basic_shadow_DOM_both_fields_together_in_a_shadow_root.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+<!-- Simple form with username and password fields together in a shadow root with a <form> ancestor -->
+<!-- This form is based off of toolkit/components/passwordmgr/test/browser/form_basic.html -->
+<form id="both-fields-together-in-a-shadow-root">
+ <!-- username and password inputs generated programmatically below -->
+ <input id="submit" type="submit">
+</form>
+
+<script>
+ const form = document.getElementById("both-fields-together-in-a-shadow-root");
+ const submitButton = document.getElementById("submit");
+ const wrapper = document.createElement("span");
+ wrapper.id = "wrapper-un-and-pw";
+ const shadow = wrapper.attachShadow({mode: "closed"});
+ const fields = ["username", "password"];
+ for (let field of fields) {
+ const inputEle = document.createElement("input");
+ inputEle.id = field;
+ inputEle.name = field;
+ if (field === "password") {
+ inputEle.type = field;
+ }
+ shadow.append(inputEle);
+ }
+ submitButton.before(wrapper);
+</script>
+
+</body></html>