[PATCH 1/2] user32/tests: Added capture test for child window when parent window is disabled.(try 5)
Guo Jian
orzhvs at gmail.com
Sun May 19 02:07:19 CDT 2013
Hi,
This time the test is simplified and combined to test_capture_3. I found
it no need to test for WM_LBUTTONUP here once ensured it's captured.
Thank you.
---
dlls/user32/tests/win.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 37d210e..2836882 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2965,6 +2965,7 @@ static void test_capture_2(void)
static void test_capture_3(HWND hwnd1, HWND hwnd2)
{
BOOL ret;
+ HWND child;
ShowWindow(hwnd1, SW_HIDE);
ShowWindow(hwnd2, SW_HIDE);
@@ -2985,6 +2986,17 @@ static void test_capture_3(HWND hwnd1, HWND hwnd2)
ok (ret, "releasecapture did not return TRUE.\n");
ret = ReleaseCapture();
ok (ret, "releasecapture did not return TRUE after second try.\n");
+
+ child = CreateWindowExA( 0, "button", NULL, WS_CHILD, 0, 0, 0, 0, hwnd1, 0, 0, NULL );
+ assert(child);
+ SetCapture(child);
+ check_wnd_state(hwnd1, hwnd1, hwnd1, child);
+
+ EnableWindow(hwnd1, FALSE);
+ todo_wine ok(GetCapture() != NULL, "capture in child window should not be released.\n");
+
+ EnableWindow(hwnd1, TRUE);
+ DestroyWindow(child);
}
static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
--
1.8.1.5
More information about the wine-patches
mailing list