[1/2] user32/tests: Add test for EndDeferWindowPos with destroyed window.

Sebastian Lackner sebastian at fds-team.de
Thu Feb 16 14:59:15 CST 2017


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
 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 992bffb2e03..0046c7cf512 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -9500,6 +9500,7 @@ static void test_winproc_limit(void)
 static void test_deferwindowpos(void)
 {
     HDWP hdwp, hdwp2;
+    HWND hwnd;
     BOOL ret;
 
     hdwp = BeginDeferWindowPos(0);
@@ -9529,6 +9530,17 @@ todo_wine
 
     ret = EndDeferWindowPos(hdwp);
     ok(ret, "got %d\n", ret);
+    hdwp = BeginDeferWindowPos(0);
+    ok(hdwp != NULL, "got %p\n", hdwp);
+
+    hwnd = create_tool_window(WS_POPUP, 0);
+    hdwp2 = DeferWindowPos(hdwp, hwnd, NULL, 0, 0, 10, 10, 0);
+    ok(hdwp2 != NULL, "got %p, error %d\n", hdwp2, GetLastError());
+    DestroyWindow(hwnd);
+
+    ret = EndDeferWindowPos(hdwp);
+todo_wine
+    ok(ret, "got %d\n", ret);
 }
 
 static void test_LockWindowUpdate(HWND parent)
-- 
2.11.0



More information about the wine-patches mailing list