Dylan Smith : richedit: Tests for notifications while redraw is disabled.
Alexandre Julliard
julliard at winehq.org
Sat Oct 18 13:38:52 CDT 2008
Module: wine
Branch: master
Commit: a959f7d74bb64fa45143bd7e44530bb797d2b134
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a959f7d74bb64fa45143bd7e44530bb797d2b134
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Fri Oct 17 21:29:42 2008 -0400
richedit: Tests for notifications while redraw is disabled.
There were some notifications that weren't sent in ME_UpdateRepaint
while redraw was disabled, so this verifies that they are not sent
with redraw disabled.
---
dlls/riched20/tests/editor.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 63fb440..308c69a 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -5184,6 +5184,15 @@ static void test_eventMask(void)
ok(queriedEventMask == (eventMask & ~ENM_CHANGE),
"wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask);
+ /* check to see if EN_CHANGE is sent when redraw is turned off */
+ SendMessage(eventMaskEditHwnd, WM_CLEAR, 0, 0);
+ SendMessage(eventMaskEditHwnd, WM_SETREDRAW, FALSE, 0);
+ queriedEventMask = 0; /* initialize to something other than we expect */
+ SendMessage(eventMaskEditHwnd, EM_REPLACESEL, 0, (LPARAM) text);
+ todo_wine ok(queriedEventMask == (eventMask & ~ENM_CHANGE),
+ "wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask);
+ SendMessage(eventMaskEditHwnd, WM_SETREDRAW, TRUE, 0);
+
DestroyWindow(parent);
}
@@ -5260,6 +5269,14 @@ static void test_WM_NOTIFY(void)
ok(received_WM_NOTIFY == 1, "Expected WM_NOTIFY was NOT sent!\n");
ok(modify_at_WM_NOTIFY == 0, "WM_NOTIFY callback saw text flagged as modified!\n");
+ /* Test for WM_NOTIFY messages with redraw disabled. */
+ SendMessage(hwndRichedit_WM_NOTIFY, EM_SETSEL, 0, 0);
+ SendMessage(hwndRichedit_WM_NOTIFY, WM_SETREDRAW, FALSE, 0);
+ received_WM_NOTIFY = 0;
+ SendMessage(hwndRichedit_WM_NOTIFY, EM_REPLACESEL, FALSE, (LPARAM)"inserted");
+ ok(received_WM_NOTIFY == 1, "Expected WM_NOTIFY was NOT sent!\n");
+ SendMessage(hwndRichedit_WM_NOTIFY, WM_SETREDRAW, TRUE, 0);
+
DestroyWindow(hwndRichedit_WM_NOTIFY);
DestroyWindow(parent);
}
More information about the wine-cvs
mailing list