[uxtheme] Added simple test for IsThemeDialogTextureEnabled

Paul Vriens Paul.Vriens at xs4all.nl
Thu Jun 15 09:20:35 CDT 2006


Hi,

added a new test. Please apply after the "Added test for IsAppThemed and
grouped it with IsThemeActive" patch.

What I'd like to do is have (in the end) several files that represent
the same files from the dll, but just for parameter checking. They will
be combined if the number of test get to small.
I will also start (at some point in time, after some extensive tests and
reading) with adding a real functional test.

Changelog
  Added IsThemeDialogTextureEnabled test.

Cheers,

Paul.
---

 dlls/uxtheme/tests/system.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

52e50517b2d0d9c85d60cf6ea40ffeb693cc497f
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 854cfc6..dbb30d5 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -28,6 +28,7 @@ #include "wine/test.h"
 static HRESULT (WINAPI * pCloseThemeData)(HTHEME);
 static BOOL    (WINAPI * pIsAppThemed)(VOID);
 static BOOL    (WINAPI * pIsThemeActive)(VOID);
+static BOOL    (WINAPI * pIsThemeDialogTextureEnabled)(HWND);
 static HTHEME  (WINAPI * pOpenThemeData)(HWND, LPCWSTR);
 static HRESULT (WINAPI * pSetWindowTheme)(HWND, LPCWSTR, LPCWSTR);
 
@@ -53,6 +54,7 @@ static BOOL InitFunctionPtrs(void)
       UXTHEME_GET_PROC(CloseThemeData)
       UXTHEME_GET_PROC(IsAppThemed)
       UXTHEME_GET_PROC(IsThemeActive)
+      UXTHEME_GET_PROC(IsThemeDialogTextureEnabled)
       UXTHEME_GET_PROC(OpenThemeData)
       UXTHEME_GET_PROC(SetWindowTheme)
     }
@@ -63,6 +65,7 @@ static void test_IsThemed(void)
 {
     BOOL bThemeActive;
     BOOL bAppThemed;
+    BOOL bTDTEnabled;
 
     SetLastError(0xdeadbeef);
     bThemeActive = pIsThemeActive();
@@ -82,6 +85,17 @@ static void test_IsThemed(void)
             "Expected S_OK, got 0x%08lx\n",
             GetLastError());
     }
+
+    /* TODO : Move this one to draw.c at some point in time? */
+    SetLastError(0xdeadbeef);
+    bTDTEnabled = pIsThemeDialogTextureEnabled(NULL);
+    todo_wine
+    {
+        ok ( bTDTEnabled == FALSE, "Expected FALSE as we passed a NULL handle\n");
+        ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE,
+            "Expected ERROR_INVALID_WINDOW_HANDLE, got 0x%08lx\n",
+            GetLastError());
+    }
 }
 
 static void test_SetWindowTheme(void)
-- 
1.3.3




More information about the wine-patches mailing list