JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / events / invalid-002.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <form method="get" id="sad_form">
9 <input name="victim" type="text" required oninvalid="testPassed('Invalid control')"/>
10 <input name="victim" type="text" pattern="Lorem ipsum" value="Loremipsum" oninvalid="testPassed('Invalid control')"/>
11 <textarea name="victim" required oninvalid="testPassed('Invalid control')"></textarea>
12 </form>
13 <div id="console"></div>
14 <script>
15 description("This test checks if checkValidity() invoked on a form control correctly asks its elements to fire an invalid event.");
16
17 if (document.getElementById("sad_form").checkValidity())
18     testFailed('checkValidity should have returned false');
19
20 var successfullyParsed = true;
21 </script>
22 <script src="../js/resources/js-test-post.js"></script>
23 </body>
24 </html>