From 1868fe651f55c58008e3d7c23e9e467c497f6aa2 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Sun, 16 Dec 2012 13:32:19 +0100 Subject: [PATCH] comdlg32/tests: Use win8 failure-code as default result. --- dlls/comdlg32/itemdlg.c | 2 +- dlls/comdlg32/tests/itemdlg.c | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 0fdfe0ddc8e..96ee5dc6615 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -2729,7 +2729,7 @@ static HRESULT WINAPI IServiceProvider_fnQueryService(IServiceProvider *iface, REFIID riid, void **ppv) { FileDialogImpl *This = impl_from_IServiceProvider(iface); - HRESULT hr = E_FAIL; + HRESULT hr = E_NOTIMPL; TRACE("%p (%s, %s, %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); *ppv = NULL; diff --git a/dlls/comdlg32/tests/itemdlg.c b/dlls/comdlg32/tests/itemdlg.c index ce05ed86ec7..4e50926560e 100644 --- a/dlls/comdlg32/tests/itemdlg.c +++ b/dlls/comdlg32/tests/itemdlg.c @@ -277,19 +277,28 @@ static BOOL test_instantiation(void) IExplorerBrowser *peb; IShellBrowser *psb; - hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IExplorerBrowser, (void**)&peb); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) IExplorerBrowser_Release(peb); - hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IShellBrowser, (void**)&psb); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) IShellBrowser_Release(psb); - hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_ICommDlgBrowser, (void**)&punk); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IServiceProvider_QueryService(psp, &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser, (void**)&punk); ok(hr == S_OK, "got 0x%08x.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); + /* since win8, the result is E_NOTIMPL for all other services */ + hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IExplorerBrowser, (void**)&peb); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + if(SUCCEEDED(hr)) IExplorerBrowser_Release(peb); + hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IShellBrowser, (void**)&psb); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + if(SUCCEEDED(hr)) IShellBrowser_Release(psb); + hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_ICommDlgBrowser, (void**)&punk); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + + hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IUnknown, (void**)&punk); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + hr = IServiceProvider_QueryService(psp, &IID_IUnknown, &IID_IUnknown, (void**)&punk); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + IServiceProvider_Release(psp); }