Commit 40e16ac1 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

user32/tests: Also include LBS_NODATA cases when testing ownerdraw.

parent 423ea979
......@@ -338,14 +338,22 @@ static HWND create_parent( void )
static void test_ownerdraw(void)
{
static const DWORD styles[] =
{
0,
LBS_NODATA
};
HWND parent, hLB;
INT ret;
RECT rc;
UINT i;
parent = create_parent();
assert(parent);
hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE, parent);
for (i = 0; i < ARRAY_SIZE(styles); i++)
{
hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE | styles[i], parent);
assert(hLB);
SetForegroundWindow(hLB);
......@@ -369,8 +377,8 @@ static void test_ownerdraw(void)
DestroyWindow(hLB);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */
hLB = CreateWindowA("listbox", "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100,
NULL, NULL, NULL, 0);
hLB = CreateWindowA("listbox", "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i],
0, 0, 100, 100, NULL, NULL, NULL, 0);
ok(hLB != NULL, "last error 0x%08x\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
......@@ -396,7 +404,7 @@ static void test_ownerdraw(void)
ok(ret == 42, "Unexpected item height %d.\n", ret);
DestroyWindow (hLB);
}
DestroyWindow(parent);
}
......
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