48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>MozInputText Tests</title>
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
|
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
|
/>
|
|
<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");
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test"></pre>
|
|
</body>
|
|
</html>
|