Sebastian Lackner : user32/tests: Add tests for internal window messages of FindWindowEx.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 18 10:25:19 CST 2014
Module: wine
Branch: master
Commit: 381adbf1c4bdce69ad3e6f35eb28eb6f7c348b19
URL: http://source.winehq.org/git/wine.git/?a=commit;h=381adbf1c4bdce69ad3e6f35eb28eb6f7c348b19
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Tue Nov 18 04:52:30 2014 +0100
user32/tests: Add tests for internal window messages of FindWindowEx.
---
dlls/user32/tests/win.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index d1a7ca4..e7ffb25 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -63,6 +63,7 @@ static DWORD (WINAPI *pGetLayout)(HDC hdc);
static BOOL (WINAPI *pMirrorRgn)(HWND hwnd, HRGN hrgn);
static BOOL test_lbuttondown_flag;
+static DWORD num_gettext_msgs;
static HWND hwndMessage;
static HWND hwndMain, hwndMain2;
static HHOOK hhook;
@@ -794,6 +795,9 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
flush_events( FALSE );
}
break;
+ case WM_GETTEXT:
+ num_gettext_msgs++;
+ break;
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -6935,22 +6939,38 @@ static void test_FindWindowEx(void)
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
+ todo_wine
+ ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+
+ num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
+ ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+
+ num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "caption" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
+ todo_wine
+ ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
+ todo_wine
+ ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
+
+ num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
+ ok( num_gettext_msgs == 0, "got %u WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
More information about the wine-cvs
mailing list