From f156a8d7270dccf1c209ac27d8d10c28e9f40e2e Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sat, 20 Aug 2016 16:58:20 +0000 Subject: [PATCH] [WIN32NT_APITEST] Add additional tests for NtUserCreateWindowEx by Sylvain Deverre. ROSTESTS-237 #resolve #comment Thanks! svn path=/trunk/; revision=72400 --- .../win32nt/ntuser/NtUserCreateWindowEx.c | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/rostests/apitests/win32nt/ntuser/NtUserCreateWindowEx.c b/rostests/apitests/win32nt/ntuser/NtUserCreateWindowEx.c index a90d19d6f60..bb096217b69 100644 --- a/rostests/apitests/win32nt/ntuser/NtUserCreateWindowEx.c +++ b/rostests/apitests/win32nt/ntuser/NtUserCreateWindowEx.c @@ -57,6 +57,7 @@ START_TEST(NtUserCreateWindowEx) UNICODE_STRING ver_cls = {12, 32, L"v2test"}; UNICODE_STRING another_cls = {10, 32, L"Dummy"}; UNICODE_STRING menu = {10, 10, L"MuMnu"}; + UNICODE_STRING null_cls = {2, 2, L""}; /* LARGE_STRING for NtUserCreateWindowEx */ LARGE_STRING l_dummy = {14, 32, 0, L"DummyMe"}; @@ -116,11 +117,30 @@ START_TEST(NtUserCreateWindowEx) 0, NULL); - TEST(NtUserGetWOWClass(hinst, &ver_cls) != 0); + TEST(NtUserRegisterClassExWOW(&wclex2, /* wndClass */ + &cls, /* ClassName */ + NULL, /* Version */ + &clsMenuName, /* MenuName */ + 0, + 0, + NULL) == 0); - TEST(atom2 != 0); + TEST(NtUserRegisterClassExWOW(&wclex2, /* wndClass */ + &cls, /* ClassName */ + &null_cls, /* Version */ + &clsMenuName, /* MenuName */ + 0, + 0, + NULL) == 0); + + TEST(NtUserGetWOWClass(hinst, &ver_cls) != 0); + TEST(NtUserGetWOWClass(hinst, &ver_cls) != NtUserGetWOWClass(hinst, &cls)); TEST(atom2 != 0); TEST(atom == atom2 && (atom | atom2) != 0); + /* Create a window without versioned class */ + TEST(CreateWnd(hinst, &l_cls, NULL, &l_wndName) == 0); + TEST(CreateWnd(hinst, &l_cls, &l_wndName, &l_wndName) == 0); + /* Now, create our first window */ hwnd = CreateWnd(hinst, &l_cls, &l_cls, &l_wndName); TEST(hwnd != 0);