Clinton Stimpson : user32:
Add test cases for update rects affected by ShowWindow.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 7 16:00:01 CST 2007
Module: wine
Branch: master
Commit: 7432a715ed7782615da1023f9b94bd6a40d99f1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7432a715ed7782615da1023f9b94bd6a40d99f1d
Author: Clinton Stimpson <cjstimpson at utwire.net>
Date: Tue Feb 6 23:15:09 2007 -0700
user32: Add test cases for update rects affected by ShowWindow.
---
dlls/user32/tests/win.c | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 735c8aa..ef456ca 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -4162,6 +4162,42 @@ void test_gettext(void)
UnregisterClass( clsname, NULL );
}
+static void test_GetUpdateRect(void)
+{
+ RECT rc1, rc2;
+ HWND hgrandparent, hparent, hchild;
+
+ hgrandparent = CreateWindowA("static", "grandparent", WS_OVERLAPPEDWINDOW,
+ 0, 0, 100, 100, NULL, NULL, 0, NULL);
+
+ hparent = CreateWindowA("static", "parent", WS_CHILD|WS_VISIBLE,
+ 0, 0, 100, 100, hgrandparent, NULL, 0, NULL);
+
+ hchild = CreateWindowA("static", "child", WS_CHILD|WS_VISIBLE,
+ 10, 10, 30, 30, hparent, NULL, 0, NULL);
+
+ ShowWindow(hgrandparent, SW_SHOW);
+ UpdateWindow(hgrandparent);
+
+ ShowWindow(hchild, SW_HIDE);
+ SetRect(&rc2, 0, 0, 0, 0);
+ GetUpdateRect(hgrandparent, &rc1, FALSE);
+ todo_wine
+ {
+ ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n",
+ rc1.left, rc1.top, rc1.right, rc1.bottom,
+ rc2.left, rc2.top, rc2.right, rc2.bottom);
+ }
+
+ SetRect(&rc2, 10, 10, 40, 40);
+ GetUpdateRect(hparent, &rc1, FALSE);
+ ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n",
+ rc1.left, rc1.top, rc1.right, rc1.bottom,
+ rc2.left, rc2.top, rc2.right, rc2.bottom);
+
+ DestroyWindow(hgrandparent);
+}
+
START_TEST(win)
{
pGetAncestor = (void *)GetProcAddress( GetModuleHandleA("user32.dll"), "GetAncestor" );
@@ -4240,6 +4276,7 @@ START_TEST(win)
test_SetWindowLong();
test_ShowWindow();
test_gettext();
+ test_GetUpdateRect();
/* add the tests above this line */
UnhookWindowsHookEx(hhook);
More information about the wine-cvs
mailing list