From 242605323d7b8eb8048a659ab1cde3213ebaab4a Mon Sep 17 00:00:00 2001
From: Roman Dadkov <romand@etersoft.ru>
Date: Fri, 8 Feb 2013 18:47:42 +0400
Subject: [PATCH] ole32/tests: Add test for IDispatch interface in
 IOleObject_QueryInterface.

---
 dlls/ole32/tests/defaulthandler.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/dlls/ole32/tests/defaulthandler.c b/dlls/ole32/tests/defaulthandler.c
index a6469b7..b1e9e7b 100644
--- a/dlls/ole32/tests/defaulthandler.c
+++ b/dlls/ole32/tests/defaulthandler.c
@@ -100,11 +100,29 @@ static void test_olestream(void)
     IStorage_Release(stg);
 }
 
+static void test_oleobject_interfaces(void)
+{
+    HRESULT hr;
+    const CLSID non_existent_class = {0xa5f1772f, 0x3772, 0x490f, {0x9e, 0xc6, 0x77, 0x13, 0xe8, 0xb3, 0x4b, 0x5d}};
+    IOleObject *ole_obj;
+    IDispatch *dispatch;
+
+    hr = OleCreateDefaultHandler(&non_existent_class, 0, &IID_IOleObject, (void**)&ole_obj);
+    ok(hr == S_OK, "got %08x\n", hr);
+
+    hr = IOleObject_QueryInterface(ole_obj, &IID_IDispatch, (void**)&dispatch);
+    todo_wine
+    ok(hr == S_OK, "got %08x\n", hr);
+
+    IOleObject_Release(ole_obj);
+}
+
 START_TEST(defaulthandler)
 {
     OleInitialize(NULL);
 
     test_olestream();
+    test_oleobject_interfaces();
 
     OleUninitialize();
 }
-- 
1.8.1.2
