Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>MozInputText Tests</title>
    <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
    <link
      rel="stylesheet"
    />
    <script
      type="module"
      src="chrome://global/content/elements/moz-input-text.mjs"
    ></script>
    <script src="lit-test-helpers.js"></script>
    <script class="testbody" type="application/javascript">
      let testHelpers = new InputTestHelpers();
      let html;
      add_setup(async function setup() {
        ({ html } = await testHelpers.setupLit());
        testHelpers.setupTests({
          templateFn: (attrs, children) =>
            html`<moz-input-text ${attrs}>${children}</moz-input-text>`,
        });
      });
      add_task(async function testMozInputTextProperties() {
        await testHelpers.testCommonInputProperties("moz-input-text");
      });
      add_task(async function testMozInputTextReadonlyProperty() {
        await testHelpers.verifyReadonly("moz-input-text");
      });
      add_task(async function testMozInputTextEvents() {
        await testHelpers.testTextBasedInputEvents("moz-input-text");
      });
      add_task(async function testMozInputTextSync() {
        await testHelpers.verifyValueSync("moz-input-text");
      });
    </script>
  </head>
  <body>
    <p id="display"></p>
    <div id="content" style="display: none"></div>
    <pre id="test"></pre>
  </body>
</html>