[uxtheme] Added test for IsAppThemed and grouped it with IsThemeActive

Paul Vriens Paul.Vriens at xs4all.nl
Wed Jun 14 13:33:57 CDT 2006


Hi,

added a new test and re-grouped. There's definitely a lot of work to be done on uxtheme :-)

Changelog
  Added IsAppThemed test and re-grouped.

Cheers,

Paul.
---

 dlls/uxtheme/tests/system.c |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 insertions(+), 5 deletions(-)

e9fc107f81c848f05fc2da648371411d03fb57c4
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index fe93660..854cfc6 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -26,6 +26,7 @@ #include "uxtheme.h"
 #include "wine/test.h"
 
 static HRESULT (WINAPI * pCloseThemeData)(HTHEME);
+static BOOL    (WINAPI * pIsAppThemed)(VOID);
 static BOOL    (WINAPI * pIsThemeActive)(VOID);
 static HTHEME  (WINAPI * pOpenThemeData)(HWND, LPCWSTR);
 static HRESULT (WINAPI * pSetWindowTheme)(HWND, LPCWSTR, LPCWSTR);
@@ -50,6 +51,7 @@ static BOOL InitFunctionPtrs(void)
     if (hUxtheme)
     {
       UXTHEME_GET_PROC(CloseThemeData)
+      UXTHEME_GET_PROC(IsAppThemed)
       UXTHEME_GET_PROC(IsThemeActive)
       UXTHEME_GET_PROC(OpenThemeData)
       UXTHEME_GET_PROC(SetWindowTheme)
@@ -57,6 +59,31 @@ static BOOL InitFunctionPtrs(void)
     return TRUE;
 }
 
+static void test_IsThemed(void)
+{
+    BOOL bThemeActive;
+    BOOL bAppThemed;
+
+    SetLastError(0xdeadbeef);
+    bThemeActive = pIsThemeActive();
+    trace("Theming is %s\n", (bThemeActive) ? "active" : "inactive");
+    todo_wine
+        ok( GetLastError() == S_OK,
+            "Expected S_OK, got 0x%08lx\n",
+            GetLastError());
+
+    /* This test is not themed */
+    SetLastError(0xdeadbeef);
+    bAppThemed = pIsAppThemed();
+    todo_wine
+    {
+        ok( bAppThemed == FALSE, "Expected FALSE as this test executable is not (yet) themed.\n");
+        ok( GetLastError() == S_OK,
+            "Expected S_OK, got 0x%08lx\n",
+            GetLastError());
+    }
+}
+
 static void test_SetWindowTheme(void)
 {
     HRESULT hRes;
@@ -86,12 +113,7 @@ static void test_OpenThemeData(void)
     WCHAR szButtonClassList[]  = {'B','u','t','t','o','n', 0 };
     WCHAR szClassList[]        = {'B','u','t','t','o','n',';','L','i','s','t','B','o','x', 0 };
 
-    SetLastError(0xdeadbeef);
     bThemeActive = pIsThemeActive();
-    todo_wine
-        ok( GetLastError() == S_OK,
-            "Expected S_OK, got 0x%08lx\n",
-            GetLastError());
 
     /* All NULL */
     SetLastError(0xdeadbeef);
@@ -204,6 +226,11 @@ START_TEST(system)
      * only show input/return behaviour
      */
 
+    /* IsThemeActive and IsAppThemed */
+    trace("Starting test_IsThemed()\n");
+    if (pIsAppThemed && pIsThemeActive)
+        test_IsThemed();
+
     /* SetWindowTheme */
     trace("Starting test_SetWindowTheme()\n");
     if (pSetWindowTheme)
-- 
1.3.3




More information about the wine-patches mailing list