Nikolay Sivov : user32/tests: Add FindWindow() test for versioned class.
Alexandre Julliard
julliard at winehq.org
Mon Nov 19 15:59:38 CST 2018
Module: wine
Branch: master
Commit: e8897ebe4ec60408d1d774bf1e4fe0b45549c00b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e8897ebe4ec60408d1d774bf1e4fe0b45549c00b
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Nov 19 16:08:46 2018 +0300
user32/tests: Add FindWindow() test for versioned class.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/tests/class.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index 5db37d4a..6c5850f 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -1319,7 +1319,7 @@ static void test_actctx_classes(void)
ATOM class;
HINSTANCE hinst;
char buff[64];
- HWND hwnd;
+ HWND hwnd, hwnd2;
char path[MAX_PATH];
GetTempPathA(ARRAY_SIZE(path), path);
@@ -1353,6 +1353,14 @@ static void test_actctx_classes(void)
hwnd = CreateWindowExA(0, testclass, "test", 0, 0, 0, 0, 0, 0, 0, hinst, 0);
ok(hwnd != NULL, "Failed to create a window.\n");
+ hwnd2 = FindWindowExA(NULL, NULL, "MyTestClass", NULL);
+todo_wine
+ ok(hwnd2 == hwnd, "Failed to find test window.\n");
+
+ hwnd2 = FindWindowExA(NULL, NULL, "4.3.2.1!MyTestClass", NULL);
+todo_wine
+ ok(hwnd2 == NULL, "Unexpected find result %p.\n", hwnd2);
+
ret = GetClassNameA(hwnd, buff, sizeof(buff));
ok(ret, "Failed to get class name.\n");
ok(!strcmp(buff, testclass), "Unexpected class name.\n");
@@ -1378,6 +1386,19 @@ static void test_actctx_classes(void)
DestroyWindow(hwnd);
+ hwnd = CreateWindowExA(0, "4.3.2.1!MyTestClass", "test", 0, 0, 0, 0, 0, 0, 0, hinst, 0);
+ ok(hwnd != NULL, "Failed to create a window.\n");
+
+ hwnd2 = FindWindowExA(NULL, NULL, "MyTestClass", NULL);
+todo_wine
+ ok(hwnd2 == hwnd, "Failed to find test window.\n");
+
+ hwnd2 = FindWindowExA(NULL, NULL, "4.3.2.1!MyTestClass", NULL);
+todo_wine
+ ok(hwnd2 == NULL, "Unexpected find result %p.\n", hwnd2);
+
+ DestroyWindow(hwnd);
+
ret = UnregisterClassA("MyTestClass", hinst);
ok(!ret, "Unexpected ret value %d.\n", ret);
More information about the wine-cvs
mailing list