bug441930_iframe.html (967B)
1 <html> 2 <body> 3 The content of this <code>textarea</code> should not disappear on page reload:<br /> 4 <textarea>This text should not disappear on page reload!</textarea> 5 <script> 6 var ta = document.getElementsByTagName("textarea").item(0); 7 if (!parent.reloaded) { 8 parent.reloaded = true; 9 ta.disabled = true; 10 location.reload(); 11 } else { 12 // Primary regression test: 13 parent.isnot(ta.value, "", 14 "Content of dynamically disabled textarea disappeared on page reload."); 15 16 // Bonus regression test: changing the textarea's defaultValue after 17 // reloading should also update the textarea's value. 18 var newDefaultValue = "new default value"; 19 ta.defaultValue = newDefaultValue; 20 parent.is(ta.value, newDefaultValue, 21 "Changing the defaultValue attribute of a textarea fails to update its value attribute."); 22 23 parent.SimpleTest.finish(); 24 } 25 </script> 26 </body> 27 </html>