richedit: Fixed simulated keyboard events on tests

Dylan Smith dylan.ah.smith at gmail.com
Sun Jun 29 01:35:14 CDT 2008


This fixes a valgrind error caused by a test using an uninitialised
value, and other errors on a test for sending keyboard events.  These
fixes are all in the same patch because they were all due to keyboard
event issues.

I factored out the keyboard event sending to pressKey and
pressKeyWithModifier functions, because this was done in multiple
places, and incorrectly in some places.

I also needed to send a WM_SETREDRAW message at the end of
test_EM_REPLACESEL, because sometimes it prevents keyboard events
from being processed.

The valgrind error were resolved from the above changes, since the root
cause of the error was the fact that a keyboard event quietly failed to
be simulated in test_EM_AUTOURLDETECT.  This led to a memory access
outside the buffer because the keyboard event was expected to add
characters to the text, and increase the size of the buffer.
---
 dlls/riched20/tests/editor.c |  130 ++++++++++++++++++------------------------
 1 files changed, 56 insertions(+), 74 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Fixed-simulated-keyboard-events-on-test.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080629/484ec417/attachment.txt 


More information about the wine-patches mailing list