comdlg32/tests: Use win8 failure-code as default result.

oldstable
Detlef Riekenberg 2012-12-16 13:32:19 +01:00 committed by Alexandre Julliard
parent 9d71d29f26
commit 1868fe651f
2 changed files with 19 additions and 10 deletions

View File

@ -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;

View File

@ -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);
}