GetTitleBarInfo tests for NULL values
András Kovács
andras at csevego.net
Sun Jun 28 15:57:19 CDT 2009
---
dlls/user32/tests/win.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index d45eba3..295efb9 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5552,6 +5552,22 @@ static void test_handles( HWND full_hwnd )
#endif
}
+static void test_gettitlebarinfo(HWND hwnd)
+{
+ BOOL ret;
+ TITLEBARINFO tbi;
+
+ SetLastError(0xdeadbeef);
+ ret = GetTitleBarInfo(NULL, &tbi);
+ ok(!ret, "GetTitleBarInfo succeeded with NULL hwnd.\n");
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* Windows 7 */, "wrong error %u\n", GetLastError());
+
+ ret = GetTitleBarInfo(hwnd, NULL);
+ ok(!ret, "GetTitleBarInfo succeeded with NULL tbi.\n");
+ ok(GetLastError() == ERROR_NOACCESS /* Windows 7 */, "wrong error %u\n", GetLastError());
+}
+
+
static void test_winregion(void)
{
HWND hwnd;
@@ -5675,6 +5691,7 @@ START_TEST(win)
test_shell_window();
test_handles( hwndMain );
test_winregion();
+ test_gettitlebarinfo(hwndMain);
/* add the tests above this line */
if (hhook) UnhookWindowsHookEx(hhook);
--
1.6.0.4
--=-q+CaU2Rl/5aKtnzvQZ7P--
More information about the wine-patches
mailing list