blob: 397c8232db3b4a45ec9aece09a2828def8c9d1e4 [file]
<!--
@WAIT-FOR:Ready
@EVENTS-TREE-DUMP
@AURALINUX-DENY:CHILDREN-CHANGED*
@AURALINUX-DENY:PARENT-CHANGED*
@UIA-WIN-DENY:*StructureChanged*
@WIN-DENY:EVENT_OBJECT_LOCATIONCHANGE*
@WIN-DENY:EVENT_OBJECT_REORDER*
@WIN-DENY:IA2_EVENT_TEXT_INSERTED*
@WIN-DENY:IA2_EVENT_TEXT_REMOVED*
-->
<!doctype html>
<html>
<head>
<title>Material Web Dialog Events</title>
<meta name="viewport" content="width=400, height=300">
<style>
body {
margin: 0;
width: 400px;
height: 300px;
}
</style>
<script type="module">
import { injectImportMap, loadAndWaitForReady, setupEventTestRunner, waitForStable } from "../material-design/resources/utils.js";
injectImportMap();
const components = [
"md-dialog",
"md-text-button"
];
setupEventTestRunner();
window.waitForStable = waitForStable;
loadAndWaitForReady(components, () => {
const statusDiv = document.getElementById("status");
const dialog = document.createElement("md-dialog");
dialog.id = "test-dialog";
dialog.quick = true;
dialog.style.width = "300px";
dialog.style.height = "200px";
const headline = document.createElement("div");
headline.slot = "headline";
headline.style.padding = "0";
headline.style.margin = "0";
headline.textContent = "Test";
const content = document.createElement("form");
content.slot = "content";
content.method = "dialog";
content.style.padding = "0";
content.style.margin = "0";
content.innerHTML = "<p style='margin:0;padding:0;'>Test</p>";
const actions = document.createElement("div");
actions.slot = "actions";
const button = document.createElement("md-text-button");
button.value = "ok";
button.textContent = "OK";
actions.appendChild(button);
dialog.appendChild(headline);
dialog.appendChild(content);
dialog.appendChild(actions);
statusDiv.appendChild(dialog);
statusDiv.setAttribute("aria-label", "Ready");
});
</script>
</head>
<body>
<div id="status" aria-label="Loading">
</div>
</body>
<script>
window.go_passes = [
async () => {
const dialog = document.getElementById("test-dialog");
if (dialog) {
await dialog.updateComplete;
dialog.show();
await waitForStable(dialog);
}
}
];
</script>
</html>