RESOLVED FIXED 16420
change regression tests to use document.execCommand instead of textInputController.doCommand
https://bugs.webkit.org/show_bug.cgi?id=16420
Summary change regression tests to use document.execCommand instead of textInputContr...
Darin Adler
Reported 2007-12-13 09:37:44 PST
document.execCommand is cross-platform, and textInputController.doCommand is Mac OS X only. So we should change cross-platform tests to use execCommand.
Attachments
work in progress (includes some unrelated changes) (168.62 KB, patch)
2007-12-13 09:55 PST, Darin Adler
no flags
patch (104.53 KB, patch)
2007-12-14 09:42 PST, Darin Adler
ap: review+
Darin Adler
Comment 1 2007-12-13 09:55:11 PST
Created attachment 17874 [details] work in progress (includes some unrelated changes)
Darin Adler
Comment 2 2007-12-14 09:42:19 PST
Alexey Proskuryakov
Comment 3 2007-12-14 10:52:45 PST
Comment on attachment 17892 [details] patch r=me + (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for + NSTextView. This was left over from when we used NSTextField and NSTextView for form + elements and is no longer used at all. I think I heard about some plug-ins creating Cocoa views - can this break them? +static bool verticalScrollDistance(Frame* frame) This sounds like it should be int. -if (window.layoutTestController) - textInputController.doCommand("selectLine:"); +document.execCommand("SelectLine"); Some of these tests have comments saying that they cannot be run outside DRT - perhaps these comments should be removed.
Darin Adler
Comment 4 2007-12-14 11:00:22 PST
(In reply to comment #3) > (From update of attachment 17892 [details] [edit]) > r=me > > + (WebCore::EventHandler::passMouseDownEventToWidget): Removed the > special case code for > + NSTextView. This was left over from when we used NSTextField and > NSTextView for form > + elements and is no longer used at all. > > I think I heard about some plug-ins creating Cocoa views - can this break them? These changes might have some small effect on such plug-ins, but I'm pretty sure that the old behavior wasn't even particularly helpful for them. It was specifically aimed at our form elements; for example it only worked if the top level NSView in a plug-in was an NSTextField or NSTextView, which is highly unlikely. > +static bool verticalScrollDistance(Frame* frame) > > This sounds like it should be int. Uh oh! Good catch! > -if (window.layoutTestController) > - textInputController.doCommand("selectLine:"); > +document.execCommand("SelectLine"); > > Some of these tests have comments saying that they cannot be run outside DRT - > perhaps these comments should be removed. Yes, I mentioned those in my ChangeLog. + To avoid changing results at this time, I didn't correct the many tests that now have + misleading "this test cannot be run manually" text or references to "NSResponder" or + uneeded instructions for running the test manually. We can do that on a later pass.
Darin Adler
Comment 5 2007-12-14 12:05:19 PST
Committed revision 28717.
Note You need to log in before you can comment on or make changes to this bug.