[PATCH] comdlg32/tests: Use win8 failure-code as default result [try 2]

Detlef Riekenberg wine.dev at web.de
Sun Dec 16 06:32:19 CST 2012


try2: use win8 result as base and mark prev. results as broken.

winetestbot crash sometimes in comdlg32:itemdlg on win7 or win2008,
but that is independant from this win8 fix.
http://test.winehq.org/data/tests/comdlg32:itemdlg.html
http://testbot.winehq.org/JobDetails.pl?Key=23422

--
By by ... Detlef
---
 dlls/comdlg32/itemdlg.c       |    2 +-
 dlls/comdlg32/tests/itemdlg.c |   19 ++++++++++++++-----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c
index 0fdfe0d..96ee5dc 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 ce05ed8..4e50926 100644
--- a/dlls/comdlg32/tests/itemdlg.c
+++ b/dlls/comdlg32/tests/itemdlg.c
@@ -277,17 +277,26 @@ static BOOL test_instantiation(void)
         IExplorerBrowser *peb;
         IShellBrowser *psb;
 
+        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_FAIL, "got 0x%08x.\n", hr);
+        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_FAIL, "got 0x%08x.\n", hr);
+        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_FAIL, "got 0x%08x.\n", hr);
+        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_SExplorerBrowserFrame, &IID_ICommDlgBrowser, (void**)&punk);
-        ok(hr == S_OK, "got 0x%08x.\n", hr);
+
+        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);
-- 
1.7.5.4




More information about the wine-patches mailing list