Project import generated by Copybara.
GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/node_modules/dialog-polyfill/tests/form.html b/node_modules/dialog-polyfill/tests/form.html
new file mode 100644
index 0000000..75e1645
--- /dev/null
+++ b/node_modules/dialog-polyfill/tests/form.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<meta charset='utf-8'>
+<head>
+<script src="../dist/dialog-polyfill.js"></script>
+<link rel="stylesheet" type="text/css" href="../dist/dialog-polyfill.css">
+</head>
+<body>
+
+ <p>
+Enter a value and submit the form. The close event will be fired and the <code>returnValue</code> of the dialog will be alerted.
+ </p>
+
+<input type="text" placeholder="Focusable pre" />
+
+<dialog>
+ <form method="dialog">
+ <input type="text" placeholder="Enter value" />
+ <input type="reset" value="Reset" />
+ <input type="submit" value="Stuff" />
+ <input type="submit" value="Done" />
+ <button type="submit" value="Button Value Is Different Than Text">Button Submit</button>
+ <button value="Regular Button Value">Button</button>
+ </form>
+</dialog>
+
+<button id="show">Show Dialog</button>
+
+<input type="text" placeholder="Focusable post" />
+
+
+<script>
+var dialog = document.querySelector('dialog');
+dialogPolyfill.registerDialog(dialog);
+dialog.showModal();
+
+dialog.addEventListener('close', function() {
+ var valueEl = dialog.querySelector('input[type="text"]');
+ alert(dialog.returnValue);
+});
+
+show.addEventListener('click', function() {
+ dialog.showModal();
+});
+
+</script>
+</body>
+</html>