Module: wine Branch: master Commit: d3b42a13d2132dc7916ffa624bd560058aba158f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3b42a13d2132dc7916ffa624b...
Author: Paul Gofman gofmanp@gmail.com Date: Fri Jan 15 15:09:55 2016 +0300
ole32/tests: OleGetClipboard should succeed when COM/OLE is not inited.
Signed-off-by: Paul Gofman gofmanp@gmail.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ole32/tests/clipboard.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c index 1087de3..3eb9901 100644 --- a/dlls/ole32/tests/clipboard.c +++ b/dlls/ole32/tests/clipboard.c @@ -455,6 +455,17 @@ static HRESULT DataObjectImpl_CreateComplex(LPDATAOBJECT *lplpdataobj) return S_OK; }
+static void test_get_clipboard_unitialized(void) +{ + HRESULT hr; + IDataObject *pDObj; + + pDObj = (IDataObject *)0xdeadbeef; + hr = OleGetClipboard(&pDObj); + todo_wine ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK); + if (pDObj && pDObj != (IDataObject *)0xdeadbeef) IDataObject_Release(pDObj); +} + static void test_get_clipboard(void) { HRESULT hr; @@ -1592,6 +1603,7 @@ static void test_get_clipboard_locked(void)
START_TEST(clipboard) { + test_get_clipboard_unitialized(); test_set_clipboard(); test_consumer_refs(); test_flushed_getdata();