1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
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");
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
;
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");