[uxtheme][2] Added simple test for IsThemeDialogTextureEnabled (2nd try)

Paul Vriens Paul.Vriens at xs4all.nl
Thu Jun 15 09:41:57 CDT 2006


Hi,

added a new test (now more consistent with the other tests).
Please apply after the "Added test for IsAppThemed and
grouped it with IsThemeActive" patch. 

I've now also started numbering them.

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.
---

diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 854cfc6..604dd28 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)
@@ -226,9 +240,9 @@ START_TEST(system)
      * only show input/return behaviour
      */
 
-    /* IsThemeActive and IsAppThemed */
+    /* IsThemeActive, IsAppThemed and IsThemeDialogTextureEnabled */
     trace("Starting test_IsThemed()\n");
-    if (pIsAppThemed && pIsThemeActive)
+    if (pIsAppThemed && pIsThemeActive && pIsThemeDialogTextureEnabled)
         test_IsThemed();
 
     /* SetWindowTheme */
-- 
1.4.0




More information about the wine-patches mailing list