summaryrefslogtreecommitdiffstats
path: root/mobile/android/geckoview/src/androidTest/assets/www/inputs.html
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/android/geckoview/src/androidTest/assets/www/inputs.html')
-rw-r--r--mobile/android/geckoview/src/androidTest/assets/www/inputs.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/mobile/android/geckoview/src/androidTest/assets/www/inputs.html b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html
new file mode 100644
index 0000000000..7bf86c82df
--- /dev/null
+++ b/mobile/android/geckoview/src/androidTest/assets/www/inputs.html
@@ -0,0 +1,61 @@
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Inputs</title>
+ <script>
+ class CustomTextBox extends HTMLElement {
+ constructor() {
+ super();
+
+ this.attachShadow({mode: 'open'});
+ const wrapper = document.createElement('span');
+ this.textbox = wrapper.appendChild(document.createElement("input"));
+ this.textbox.value = "adipisci";
+ this.shadowRoot.append(wrapper);
+ }
+
+ focus() {
+ this.textbox.focus();
+ }
+
+ select() {
+ this.textbox.select();
+ }
+
+ setSelectionRange(start, end) {
+ this.textbox.setSelectionRange(start, end);
+ }
+
+ get selectionStart() {
+ return this.textbox.selectionStart;
+ }
+
+ get selectionEnd() {
+ return this.textbox.selectionEnd;
+ }
+
+ get value() {
+ return this.textbox.value;
+ }
+ }
+ customElements.define('x-input', CustomTextBox);
+ </script>
+ </head>
+ <body>
+ <div id="text">lorem</div>
+ <input type="text" id="input" value="ipsum">
+ <textarea id="textarea">dolor</textarea>
+ <div id="contenteditable" contenteditable="true">sit</div>
+ <iframe id="iframe" src="selectionAction_frame.html"></iframe>
+ <iframe id="designmode" src="selectionAction_frame.html"></iframe>
+ <x-input id="x-input"></x-input>
+ </body>
+ <script>
+ addEventListener("load", function() {
+ document.getElementById("iframe").contentDocument.body.textContent = "amet";
+ var designmode = document.getElementById("designmode");
+ designmode.contentDocument.body.textContent = "consectetur";
+ designmode.contentDocument.designMode = "on";
+ });
+ </script>
+</html>