Nikolay Sivov : shell32/tests: Fix a test failure on Win8.

Alexandre Julliard julliard at winehq.org
Thu Feb 13 13:26:09 CST 2014


Module: wine
Branch: master
Commit: 7dc45ea585ca328918419617186e50b56b42e7f4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7dc45ea585ca328918419617186e50b56b42e7f4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Feb 13 10:14:16 2014 +0400

shell32/tests: Fix a test failure on Win8.

---

 dlls/shell32/tests/shlfolder.c |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 7b8a57e..f096476 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -3639,10 +3639,23 @@ static void test_ShellItemBindToHandler(void)
             ok(hr == S_OK, "Got 0x%08x\n", hr);
             if(SUCCEEDED(hr)) IUnknown_Release(punk);
 
-            /* BHID_Transfer */
-            hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk);
-            ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr);
-            if(SUCCEEDED(hr)) IUnknown_Release(punk);
+            /* BHID_Transfer
+               ITransferSource and ITransferDestination are accessible starting Vista, IUnknown is
+               supported start Win8. */
+            hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferSource, (void**)&punk);
+            ok(hr == S_OK || broken(FAILED(hr)) /* pre-Vista */, "Got 0x%08x\n", hr);
+            if(SUCCEEDED(hr))
+            {
+                IUnknown_Release(punk);
+
+                hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferDestination, (void**)&punk);
+                ok(hr == S_OK, "Got 0x%08x\n", hr);
+                if(SUCCEEDED(hr)) IUnknown_Release(punk);
+
+                hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk);
+                ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Win8 */, "Got 0x%08x\n", hr);
+                if(SUCCEEDED(hr)) IUnknown_Release(punk);
+            }
 
             /* BHID_EnumItems */
             hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumItems, &IID_IEnumShellItems, (void**)&punk);




More information about the wine-cvs mailing list