| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <script src="../../../resources/js-test.js"></script> | 5 <script src="../../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body onload="runTests()"> | 7 <body onload="runTests()"> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 description("Tests for <a href=\"https://bugs.webkit.org/show_bug.cgi?id=14439\"
> \ | 10 description("Tests for <a href=\"https://bugs.webkit.org/show_bug.cgi?id=14439\"
> \ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 shouldBe("btn.type = ' '; btn.type", "'submit'"); | 51 shouldBe("btn.type = ' '; btn.type", "'submit'"); |
| 52 shouldBe("btn.getAttribute('type')", "' '"); | 52 shouldBe("btn.getAttribute('type')", "' '"); |
| 53 | 53 |
| 54 shouldBe("btn.type = 'button '; btn.type", "'submit'"); | 54 shouldBe("btn.type = 'button '; btn.type", "'submit'"); |
| 55 shouldBe("btn.getAttribute('type')", "'button '"); | 55 shouldBe("btn.getAttribute('type')", "'button '"); |
| 56 | 56 |
| 57 shouldBe("btn.type = ' b u t t o n '; btn.type", "'submit'"); | 57 shouldBe("btn.type = ' b u t t o n '; btn.type", "'submit'"); |
| 58 shouldBe("btn.getAttribute('type')", "' b u t t o n '"); | 58 shouldBe("btn.getAttribute('type')", "' b u t t o n '"); |
| 59 | 59 |
| 60 shouldBe("btn.type = null; btn.type", "'submit'"); | 60 shouldBe("btn.type = null; btn.type", "'submit'"); |
| 61 shouldBe("btn.getAttribute('type')", "null"); | 61 shouldBe("btn.getAttribute('type')", "'null'"); |
| 62 | 62 |
| 63 shouldBe("btn.type = undefined; btn.type", "'submit'"); | 63 shouldBe("btn.type = undefined; btn.type", "'submit'"); |
| 64 shouldBe("btn.getAttribute('type')", "'undefined'"); | 64 shouldBe("btn.getAttribute('type')", "'undefined'"); |
| 65 } | 65 } |
| 66 | 66 |
| 67 function testTypeBehavior() | 67 function testTypeBehavior() |
| 68 { | 68 { |
| 69 btn = document.getElementById("b"); | 69 btn = document.getElementById("b"); |
| 70 txt = document.getElementById("t"); | 70 txt = document.getElementById("t"); |
| 71 | 71 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } else | 105 } else |
| 106 finishJSTest(); | 106 finishJSTest(); |
| 107 } | 107 } |
| 108 </script> | 108 </script> |
| 109 <form id="f" action="#submitted" onsubmit="formWasSubmitted();"> | 109 <form id="f" action="#submitted" onsubmit="formWasSubmitted();"> |
| 110 <input id="t" type="text" /> | 110 <input id="t" type="text" /> |
| 111 <button id="b"></button> | 111 <button id="b"></button> |
| 112 </form> | 112 </form> |
| 113 </body> | 113 </body> |
| 114 </html> | 114 </html> |
| OLD | NEW |