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.
This commit is contained in:
Dylan Smith 2008-10-17 21:29:42 -04:00 committed by Alexandre Julliard
parent c80b99a2f4
commit a959f7d74b
1 changed files with 17 additions and 0 deletions

View File

@ -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);
}