Module: wine Branch: master Commit: 6c7db4ba5e1bf0eb78f026e8d9403d83a1852e22 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6c7db4ba5e1bf0eb78f026e8d...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Mar 26 10:24:59 2021 +0100
windows.globalization: Fake empty IGlobalizationPreferencesStatics properties.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/windows.globalization/main.c | 6 ++-- dlls/windows.globalization/tests/globalization.c | 36 +++++++++++++++++++++++- 2 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/dlls/windows.globalization/main.c b/dlls/windows.globalization/main.c index 9aa07700310..1c41e77d41b 100644 --- a/dlls/windows.globalization/main.c +++ b/dlls/windows.globalization/main.c @@ -375,21 +375,21 @@ static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Calendars( IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out) { FIXME("iface %p, out %p stub!\n", iface, out); - return E_NOTIMPL; + return hstring_vector_create(NULL, 0, out); }
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Clocks( IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out) { FIXME("iface %p, out %p stub!\n", iface, out); - return E_NOTIMPL; + return hstring_vector_create(NULL, 0, out); }
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Currencies( IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out) { FIXME("iface %p, out %p stub!\n", iface, out); - return E_NOTIMPL; + return hstring_vector_create(NULL, 0, out); }
static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Languages( diff --git a/dlls/windows.globalization/tests/globalization.c b/dlls/windows.globalization/tests/globalization.c index a2b47e53be5..b824cfdf8ae 100644 --- a/dlls/windows.globalization/tests/globalization.c +++ b/dlls/windows.globalization/tests/globalization.c @@ -47,7 +47,7 @@ static void test_GlobalizationPreferences(void) static const WCHAR *class_name = L"Windows.System.UserProfile.GlobalizationPreferences";
IGlobalizationPreferencesStatics *preferences_statics = NULL; - IVectorView_HSTRING *languages = NULL; + IVectorView_HSTRING *languages = NULL, *calendars, *clocks, *currencies; IActivationFactory *factory = NULL; IInspectable *inspectable = NULL, *tmp_inspectable = NULL; IAgileObject *agile_object = NULL, *tmp_agile_object = NULL; @@ -178,6 +178,40 @@ static void test_GlobalizationPreferences(void)
IVectorView_HSTRING_Release(languages);
+ + hr = IGlobalizationPreferencesStatics_get_Calendars(preferences_statics, &calendars); + ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Calendars failed, hr %#x\n", hr); + + size = 0xdeadbeef; + hr = IVectorView_HSTRING_get_Size(calendars, &size); + ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr); + todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size); + + IVectorView_HSTRING_Release(calendars); + + + hr = IGlobalizationPreferencesStatics_get_Clocks(preferences_statics, &clocks); + ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Clocks failed, hr %#x\n", hr); + + size = 0xdeadbeef; + hr = IVectorView_HSTRING_get_Size(clocks, &size); + ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr); + todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size); + + IVectorView_HSTRING_Release(clocks); + + + hr = IGlobalizationPreferencesStatics_get_Currencies(preferences_statics, ¤cies); + ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Currencies failed, hr %#x\n", hr); + + size = 0xdeadbeef; + hr = IVectorView_HSTRING_get_Size(currencies, &size); + ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr); + todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size); + + IVectorView_HSTRING_Release(currencies); + + IGlobalizationPreferencesStatics_Release(preferences_statics);
IAgileObject_Release(agile_object);