Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / html / test / test_bug613113.html
blob3308246af04057e854ba291a5d9b38d10806ed15
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=613113
5 -->
6 <head>
7 <title>Test for Bug 613113</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613113">Mozilla Bug 613113</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15 <iframe name='f'></iframe>
16 <form target='f' action="data:text/html,">
17 <output></output>
18 <button></button>
19 </form>
20 </div>
21 <pre id="test">
22 <script type="application/javascript">
24 /** Test for Bug 613113 **/
26 SimpleTest.waitForExplicitFinish();
28 var invalidEvent = false;
30 var form = document.forms[0];
31 var button = document.getElementsByTagName('button')[0];
32 var output = document.getElementsByTagName('output')[0];
34 output.addEventListener("invalid", function() {
35 ok(false, "invalid event should have been send");
36 });
38 form.addEventListener("submit", function() {
39 ok(true, "submit has been caught");
40 setTimeout(function() {
41 SimpleTest.finish();
42 }, 0);
43 });
45 output.setCustomValidity("foo");
47 button.click();
49 </script>
50 </pre>
51 </body>
52 </html>