RESOLVED FIXED 11771
Add a test for resetting a textarea form control
https://bugs.webkit.org/show_bug.cgi?id=11771
Summary Add a test for resetting a textarea form control
Kirby White
Reported 2006-12-06 14:30:47 PST
Resetting a form with an <input type="reset"> or <button type="reset"> control doesn't clear a <textarea>, nor set it to its default value if it has one.
Attachments
Test case (300 bytes, text/html)
2006-12-06 15:21 PST, Kirby White
no flags
Unit test for resetting textarea controls (2.31 KB, patch)
2006-12-06 19:46 PST, Kirby White
no flags
Unit test including pixel test (33.37 KB, patch)
2006-12-07 09:11 PST, Kirby White
adele: review+
Kirby White
Comment 1 2006-12-06 15:21:10 PST
Created attachment 11758 [details] Test case I can't assign this to myself, but I have a patch ready as soon as I make the unit test.
Mark Rowe (bdash)
Comment 2 2006-12-06 15:43:29 PST
Your test case already works correctly for me in both WebKit 418.9.1 and ToT.
Kirby White
Comment 3 2006-12-06 19:46:34 PST
Created attachment 11760 [details] Unit test for resetting textarea controls Sorry, I was using a flawed testcase, with a syntactic error that didn't carry over to the reduced one I posted. Since I already have it, though, here's a test for the problem that turned out not to be a problem. I've verified that this test works, and at the same time checked that no other tests catch the problem, by building a deliberately broken library. I'd really like to make a PNG for this test, since the value of the textarea in JS might not match the value displayed on the page if it doesn't update properly. But I can't find any information on how to do that. Any pointers?
Alexey Proskuryakov
Comment 4 2006-12-06 21:44:17 PST
To create a pixel test, just remove the dumpAsText() call, and add a --pixel switch to run-webkit-tests when generating the results.
Kirby White
Comment 5 2006-12-07 09:11:08 PST
Created attachment 11762 [details] Unit test including pixel test Great, thanks! Here's the full test.
Mark Rowe (bdash)
Comment 6 2006-12-07 16:27:03 PST
Landed in r18067.
Note You need to log in before you can comment on or make changes to this bug.