Lazily create HTMLInputElement's inputType and shadow subtree
[WebKit-https.git] / LayoutTests / fast / dom / HTMLInputElement / border-attribute-crash.html
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/js-test-pre.js"></script>
4 <div id="testDiv"></div>
5 <script>
6 description("Tests that we don't crash when parsing an input element with a border attribute and image type.");
7
8 var testDiv = document.getElementById("testDiv");
9 testDiv.innerHTML = "<input border='0' type='image' src='submit.gif' alt='Submit'>";
10
11 var input = testDiv.firstChild;
12 shouldBeEqualToString("input.getAttribute('border')", "0");
13 shouldBeEqualToString("input.getAttribute('type')", "image");
14 shouldBeEqualToString("input.getAttribute('src')", "submit.gif");
15 shouldBeEqualToString("input.getAttribute('alt')", "Submit");
16
17 </script>
18 <script src="../../../resources/js-test-post.js"></script>
19 </body>