Module: wine Branch: master Commit: e4ede41c5f702500897d85c66f983cd2022bf60a URL: https://gitlab.winehq.org/wine/wine/-/commit/e4ede41c5f702500897d85c66f983cd...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Mon Sep 26 12:22:19 2022 +0300
uxtheme/tests: Add a test for OpenThemeData("explorer::treeview").
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
---
dlls/uxtheme/tests/system.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index d119b68d4fd..c9fdf30820d 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -558,6 +558,27 @@ static void test_OpenThemeData(void)
/* Only do the next checks if we have an active theme */
+ SetLastError(0xdeadbeef); + hTheme = OpenThemeData(hWnd, L"dead::beef;explorer::treeview"); + ok(!hTheme, "OpenThemeData() should fail\n"); + ok(GetLastError() == E_PROP_ID_UNSUPPORTED, "Got unexpected %#lx.\n", GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = OpenThemeData(hWnd, L"explorer::treeview"); + todo_wine + ok(hTheme != NULL, "OpenThemeData() failed\n"); + todo_wine + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError()); + CloseThemeData(hTheme); + + SetLastError(0xdeadbeef); + hTheme = OpenThemeData(hWnd, L"deadbeef::treeview;dead::beef"); + todo_wine + ok(hTheme != NULL, "OpenThemeData() failed\n"); + todo_wine + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError()); + CloseThemeData(hTheme); + SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n");