mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
comctl32: Add listview checkbox toggle test.
This commit is contained in:
parent
69b032b7ff
commit
778c04db07
1 changed files with 38 additions and 0 deletions
|
@ -539,6 +539,44 @@ static void test_checkboxes(void)
|
|||
r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item);
|
||||
ok(item.state == 0x1aaa, "state %x\n", item.state);
|
||||
|
||||
/* Toggle checkbox tests (bug 9934) */
|
||||
memset (&item, 0xcc, sizeof(item));
|
||||
item.mask = LVIF_STATE;
|
||||
item.iItem = 3;
|
||||
item.iSubItem = 0;
|
||||
item.state = LVIS_FOCUSED;
|
||||
item.stateMask = LVIS_FOCUSED;
|
||||
r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM) &item);
|
||||
expect(1, r);
|
||||
|
||||
item.iItem = 3;
|
||||
item.mask = LVIF_STATE;
|
||||
item.stateMask = 0xffff;
|
||||
r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item);
|
||||
ok(item.state == 0x1aab, "state %x\n", item.state);
|
||||
|
||||
r = SendMessage(hwnd, WM_KEYDOWN, VK_SPACE, 0);
|
||||
expect(0, r);
|
||||
r = SendMessage(hwnd, WM_KEYUP, VK_SPACE, 0);
|
||||
expect(0, r);
|
||||
|
||||
item.iItem = 3;
|
||||
item.mask = LVIF_STATE;
|
||||
item.stateMask = 0xffff;
|
||||
r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item);
|
||||
todo_wine ok(item.state == 0x2aab, "state %x\n", item.state);
|
||||
|
||||
r = SendMessage(hwnd, WM_KEYDOWN, VK_SPACE, 0);
|
||||
expect(0, r);
|
||||
r = SendMessage(hwnd, WM_KEYUP, VK_SPACE, 0);
|
||||
expect(0, r);
|
||||
|
||||
item.iItem = 3;
|
||||
item.mask = LVIF_STATE;
|
||||
item.stateMask = 0xffff;
|
||||
r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item);
|
||||
ok(item.state == 0x1aab, "state %x\n", item.state);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue