mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[UXTHEME_WINETEST] Sync with Wine Staging 4.0. CORE-15682
This commit is contained in:
parent
f8629c57a9
commit
4df86f782f
1 changed files with 15 additions and 35 deletions
|
@ -77,7 +77,6 @@ static void test_GetWindowTheme(void)
|
||||||
{
|
{
|
||||||
HTHEME hTheme;
|
HTHEME hTheme;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
BOOL bDestroyed;
|
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
hTheme = GetWindowTheme(NULL);
|
hTheme = GetWindowTheme(NULL);
|
||||||
|
@ -89,7 +88,7 @@ static void test_GetWindowTheme(void)
|
||||||
|
|
||||||
/* Only do the bare minimum to get a valid hwnd */
|
/* Only do the bare minimum to get a valid hwnd */
|
||||||
hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
|
hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
|
||||||
if (!hWnd) return;
|
ok(hWnd != NULL, "Failed to create a test window.\n");
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
hTheme = GetWindowTheme(hWnd);
|
hTheme = GetWindowTheme(hWnd);
|
||||||
|
@ -98,17 +97,13 @@ static void test_GetWindowTheme(void)
|
||||||
"Expected 0xdeadbeef, got 0x%08x\n",
|
"Expected 0xdeadbeef, got 0x%08x\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
|
|
||||||
bDestroyed = DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
if (!bDestroyed)
|
|
||||||
trace("Window %p couldn't be destroyed : 0x%08x\n",
|
|
||||||
hWnd, GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_SetWindowTheme(void)
|
static void test_SetWindowTheme(void)
|
||||||
{
|
{
|
||||||
HRESULT hRes;
|
HRESULT hRes;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
BOOL bDestroyed;
|
|
||||||
|
|
||||||
hRes = SetWindowTheme(NULL, NULL, NULL);
|
hRes = SetWindowTheme(NULL, NULL, NULL);
|
||||||
todo_wine
|
todo_wine
|
||||||
|
@ -116,15 +111,12 @@ todo_wine
|
||||||
|
|
||||||
/* Only do the bare minimum to get a valid hwnd */
|
/* Only do the bare minimum to get a valid hwnd */
|
||||||
hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
|
hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
|
||||||
if (!hWnd) return;
|
ok(hWnd != NULL, "Failed to create a test window.\n");
|
||||||
|
|
||||||
hRes = SetWindowTheme(hWnd, NULL, NULL);
|
hRes = SetWindowTheme(hWnd, NULL, NULL);
|
||||||
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
bDestroyed = DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
if (!bDestroyed)
|
|
||||||
trace("Window %p couldn't be destroyed : 0x%08x\n",
|
|
||||||
hWnd, GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_OpenThemeData(void)
|
static void test_OpenThemeData(void)
|
||||||
|
@ -133,7 +125,6 @@ static void test_OpenThemeData(void)
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
BOOL bThemeActive;
|
BOOL bThemeActive;
|
||||||
HRESULT hRes;
|
HRESULT hRes;
|
||||||
BOOL bDestroyed;
|
|
||||||
BOOL bTPDefined;
|
BOOL bTPDefined;
|
||||||
|
|
||||||
WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 };
|
WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 };
|
||||||
|
@ -278,10 +269,7 @@ static void test_OpenThemeData(void)
|
||||||
GetLastError());
|
GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
bDestroyed = DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
if (!bDestroyed)
|
|
||||||
trace("Window %p couldn't be destroyed : 0x%08x\n",
|
|
||||||
hWnd, GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_OpenThemeDataEx(void)
|
static void test_OpenThemeDataEx(void)
|
||||||
|
@ -289,7 +277,6 @@ static void test_OpenThemeDataEx(void)
|
||||||
HTHEME hTheme;
|
HTHEME hTheme;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
BOOL bThemeActive;
|
BOOL bThemeActive;
|
||||||
BOOL bDestroyed;
|
|
||||||
|
|
||||||
WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 };
|
WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 };
|
||||||
WCHAR szButtonClassList[] = {'B','u','t','t','o','n', 0 };
|
WCHAR szButtonClassList[] = {'B','u','t','t','o','n', 0 };
|
||||||
|
@ -423,10 +410,7 @@ static void test_OpenThemeDataEx(void)
|
||||||
"Expected ERROR_SUCCESS, got 0x%08x\n",
|
"Expected ERROR_SUCCESS, got 0x%08x\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
|
|
||||||
bDestroyed = DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
if (!bDestroyed)
|
|
||||||
trace("Window %p couldn't be destroyed : 0x%08x\n",
|
|
||||||
hWnd, GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_GetCurrentThemeName(void)
|
static void test_GetCurrentThemeName(void)
|
||||||
|
@ -463,9 +447,8 @@ static void test_GetCurrentThemeName(void)
|
||||||
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
/* The same is true if the number of characters is too small for Color and/or Size */
|
/* The same is true if the number of characters is too small for Color and/or Size */
|
||||||
hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR),
|
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor, 2,
|
||||||
currentColor, 2,
|
currentSize, ARRAY_SIZE(currentSize));
|
||||||
currentSize, sizeof(currentSize) / sizeof(WCHAR));
|
|
||||||
if (bThemeActive)
|
if (bThemeActive)
|
||||||
todo_wine
|
todo_wine
|
||||||
ok(hRes == E_NOT_SUFFICIENT_BUFFER ||
|
ok(hRes == E_NOT_SUFFICIENT_BUFFER ||
|
||||||
|
@ -475,7 +458,7 @@ static void test_GetCurrentThemeName(void)
|
||||||
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
/* Given number of characters is correct */
|
/* Given number of characters is correct */
|
||||||
hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), NULL, 0, NULL, 0);
|
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), NULL, 0, NULL, 0);
|
||||||
if (bThemeActive)
|
if (bThemeActive)
|
||||||
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
||||||
else
|
else
|
||||||
|
@ -491,26 +474,23 @@ static void test_GetCurrentThemeName(void)
|
||||||
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
/* The too large case is only for the theme name, not for color name or size name */
|
/* The too large case is only for the theme name, not for color name or size name */
|
||||||
hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR),
|
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor,
|
||||||
currentColor, sizeof(currentTheme),
|
sizeof(currentTheme), currentSize, ARRAY_SIZE(currentSize));
|
||||||
currentSize, sizeof(currentSize) / sizeof(WCHAR));
|
|
||||||
if (bThemeActive)
|
if (bThemeActive)
|
||||||
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
||||||
else
|
else
|
||||||
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR),
|
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor,
|
||||||
currentColor, sizeof(currentTheme) / sizeof(WCHAR),
|
ARRAY_SIZE(currentTheme), currentSize, sizeof(currentSize));
|
||||||
currentSize, sizeof(currentSize));
|
|
||||||
if (bThemeActive)
|
if (bThemeActive)
|
||||||
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
||||||
else
|
else
|
||||||
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes);
|
||||||
|
|
||||||
/* Correct call */
|
/* Correct call */
|
||||||
hRes = GetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR),
|
hRes = GetCurrentThemeName(currentTheme, ARRAY_SIZE(currentTheme), currentColor,
|
||||||
currentColor, sizeof(currentColor) / sizeof(WCHAR),
|
ARRAY_SIZE(currentColor), currentSize, ARRAY_SIZE(currentSize));
|
||||||
currentSize, sizeof(currentSize) / sizeof(WCHAR));
|
|
||||||
if (bThemeActive)
|
if (bThemeActive)
|
||||||
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue