mirror of
https://github.com/reactos/reactos.git
synced 2025-06-17 05:28:30 +00:00
[UXTHEME_APITEST] Skip some tests that fail without a theme
This commit is contained in:
parent
83f076918a
commit
c35e75897d
2 changed files with 23 additions and 6 deletions
|
@ -186,7 +186,10 @@ void Test_Params()
|
||||||
ok (hr == E_HANDLE, "Expected E_HANDLE got 0x%lx error\n", hr);
|
ok (hr == E_HANDLE, "Expected E_HANDLE got 0x%lx error\n", hr);
|
||||||
|
|
||||||
hr = DrawThemeParentBackground(hWnd2, hdc, NULL);
|
hr = DrawThemeParentBackground(hWnd2, hdc, NULL);
|
||||||
ok (hr == S_FALSE, "Expected S_FALSE got 0x%lx error\n", hr);
|
if (IsThemeActive())
|
||||||
|
ok (hr == S_FALSE, "Expected S_FALSE got 0x%lx error\n", hr);
|
||||||
|
else
|
||||||
|
skip("Theme not active\n");
|
||||||
|
|
||||||
ReleaseDC(hWnd1, hdc);
|
ReleaseDC(hWnd1, hdc);
|
||||||
hdc = GetDC(hWnd2);
|
hdc = GetDC(hWnd2);
|
||||||
|
@ -196,7 +199,10 @@ void Test_Params()
|
||||||
ok (hr == S_OK, "Expected success got 0x%lx error\n", hr);
|
ok (hr == S_OK, "Expected success got 0x%lx error\n", hr);
|
||||||
|
|
||||||
hr = DrawThemeParentBackground(hWnd2, hdc, NULL);
|
hr = DrawThemeParentBackground(hWnd2, hdc, NULL);
|
||||||
ok (hr == S_FALSE, "Expected S_FALSE got 0x%lx error\n", hr);
|
if (IsThemeActive())
|
||||||
|
ok (hr == S_FALSE, "Expected S_FALSE got 0x%lx error\n", hr);
|
||||||
|
else
|
||||||
|
skip("Theme not active\n");
|
||||||
ReleaseDC(hWnd2, hdc);
|
ReleaseDC(hWnd2, hdc);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,10 @@ void TestTheme(HWND hwnd)
|
||||||
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
||||||
|
|
||||||
htheme1 = OpenThemeData(hwnd, L"Toolbar");
|
htheme1 = OpenThemeData(hwnd, L"Toolbar");
|
||||||
ok (htheme1 != NULL, "OpenThemeData failed\n");
|
if (IsThemeActive())
|
||||||
|
ok (htheme1 != NULL, "OpenThemeData failed\n");
|
||||||
|
else
|
||||||
|
skip("Theme not active\n");
|
||||||
|
|
||||||
hr = SetWindowTheme(hwnd, L"", L"");
|
hr = SetWindowTheme(hwnd, L"", L"");
|
||||||
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
||||||
|
@ -63,9 +66,15 @@ void TestTheme(HWND hwnd)
|
||||||
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
ok (hr == S_OK, "Expected S_OK got 0x%lx error\n", hr);
|
||||||
|
|
||||||
htheme2 = OpenThemeData(hwnd, L"Toolbar");
|
htheme2 = OpenThemeData(hwnd, L"Toolbar");
|
||||||
ok (htheme2 != NULL, "OpenThemeData failed\n");
|
if (IsThemeActive())
|
||||||
|
{
|
||||||
ok(htheme1 != htheme2, "Expected different theme data\n");
|
ok (htheme2 != NULL, "OpenThemeData failed\n");
|
||||||
|
ok(htheme1 != htheme2, "Expected different theme data\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skip("Theme not active\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(SetWindowTheme)
|
START_TEST(SetWindowTheme)
|
||||||
|
@ -77,4 +86,6 @@ START_TEST(SetWindowTheme)
|
||||||
|
|
||||||
TestParams(hwnd);
|
TestParams(hwnd);
|
||||||
TestTheme(hwnd);
|
TestTheme(hwnd);
|
||||||
|
|
||||||
|
DestroyWindow(hwnd);
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue