Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / novalidate-attribute.html
blobd843aaa0b5a993c2e1b3ff3d4bcb2a2e5bc6e2d5
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("This test performs some simple check on the noValidate attribute.");
12 var f = document.createElement("form");
14 shouldBe("f.hasAttribute('noValidate')", "false");
15 shouldBe("f.getAttribute('noValidate')", "null");
16 shouldBe("f.noValidate", "false");
18 f.noValidate = true;
20 shouldBe("f.hasAttribute('noValidate')", "true");
21 shouldBe("f.getAttribute('noValidate')", "''");
22 shouldBe("f.noValidate", "true");
24 var f2 = document.createElement("form");
25 f2.noValidate = f.noValidate;
27 f.noValidate = false;
29 shouldBe("f.hasAttribute('noValidate')", "false");
30 shouldBe("f.getAttribute('noValidate')", "null");
31 shouldBe("f.noValidate", "false");
33 shouldBe("f2.hasAttribute('noValidate')", "true");
34 shouldBe("f2.getAttribute('noValidate')", "''");
35 shouldBe("f2.noValidate", "true");
37 f2.noValidate = false;
39 shouldBe("f2.noValidate", "false");
40 f2.noValidate = "something";
41 shouldBe("f2.hasAttribute('noValidate')", "true");
42 shouldBe("f2.getAttribute('noValidate')", "''");
43 shouldBe("f2.noValidate", "true");
44 </script>
45 </body>
46 </html>