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 formnovalidate attribute.");
12 var i
= document
.createElement("input");
13 var b
= document
.createElement("button");
15 shouldBe("i.hasAttribute('formNoValidate')", "false");
16 shouldBe("i.getAttribute('formNoValidate')", "null");
17 shouldBe("i.formNoValidate", "false");
18 shouldBe("b.hasAttribute('formNoValidate')", "false");
19 shouldBe("b.getAttribute('formNoValidate')", "null");
20 shouldBe("b.formNoValidate", "false");
22 i
.formNoValidate
= true;
23 b
.formNoValidate
= true;
25 shouldBe("i.hasAttribute('formNoValidate')", "true");
26 shouldBe("i.getAttribute('formNoValidate')", "''");
27 shouldBe("i.formNoValidate", "true");
28 shouldBe("b.hasAttribute('formNoValidate')", "true");
29 shouldBe("b.getAttribute('formNoValidate')", "''");
30 shouldBe("b.formNoValidate", "true");
32 var i2
= document
.createElement("input");
33 i2
.formNoValidate
= i
.formNoValidate
;
35 i
.formNoValidate
= false;
36 b
.formNoValidate
= false;
38 shouldBe("i.hasAttribute('formNoValidate')", "false");
39 shouldBe("i.getAttribute('formNoValidate')", "null");
40 shouldBe("i.formNoValidate", "false");
41 shouldBe("b.hasAttribute('formNoValidate')", "false");
42 shouldBe("b.getAttribute('formNoValidate')", "null");
43 shouldBe("b.formNoValidate", "false");
45 i2
.formNoValidate
= false;
46 shouldBe("i2.formNoValidate", "false");
47 i2
.formNoValidate
= "something";
48 shouldBe("i2.hasAttribute('formNoValidate')", "true");
49 shouldBe("i2.getAttribute('formNoValidate')", "''");
50 shouldBe("i2.formNoValidate", "true");