Commit b3fe7f7c authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

user32/tests: Fix tests on Windows 8.

parent 16274e78
......@@ -841,12 +841,14 @@ static void zero_notify(void)
}
#define test_notify(enchange, enmaxtext, enupdate) \
do { \
ok(notifications.en_change == enchange, "expected %d EN_CHANGE notifications, " \
"got %d\n", enchange, notifications.en_change); \
ok(notifications.en_maxtext == enmaxtext, "expected %d EN_MAXTEXT notifications, " \
"got %d\n", enmaxtext, notifications.en_maxtext); \
ok(notifications.en_update == enupdate, "expected %d EN_UPDATE notifications, " \
"got %d\n", enupdate, notifications.en_update)
"got %d\n", enupdate, notifications.en_update); \
} while(0)
static LRESULT CALLBACK edit3_wnd_procA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
......@@ -907,7 +909,9 @@ static void test_edit_control_3(void)
zero_notify();
SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str);
len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0);
ok(lstrlenA(str) > len, "text should have been truncated\n");
if (len == lstrlenA(str)) /* Win 8 */
test_notify(1, 0, 1);
else
test_notify(1, 1, 1);
SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)"");
......@@ -998,8 +1002,13 @@ static void test_edit_control_3(void)
zero_notify();
SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str);
len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0);
if (len == lstrlenA(str)) /* Win 8 */
test_notify(1, 0, 1);
else
{
ok(0 == len, "text should have been truncated, expected 0, got %d\n", len);
test_notify(1, 1, 1);
}
SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)"");
zero_notify();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment