Piotr Caban : urlmon: Added InternetSecurityManager marshalling test.

Alexandre Julliard julliard at winehq.org
Wed Dec 9 10:46:27 CST 2009


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Dec  8 16:02:52 2009 +0100

urlmon: Added InternetSecurityManager marshalling test.

---

 dlls/urlmon/tests/sec_mgr.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c
index 62471cf..06df952 100644
--- a/dlls/urlmon/tests/sec_mgr.c
+++ b/dlls/urlmon/tests/sec_mgr.c
@@ -605,6 +605,31 @@ static void test_GetZoneAttributes(void)
     ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr);
 }
 
+static void test_InternetSecurityMarshalling(void)
+{
+    IInternetSecurityManager *secmgr = NULL;
+    IUnknown *unk;
+    IStream *stream;
+    HRESULT hres;
+
+    hres = CoInternetCreateSecurityManager(NULL, &secmgr, 0);
+    if(FAILED(hres))
+        return;
+
+    hres = IInternetSecurityManager_QueryInterface(secmgr, &IID_IUnknown, (void**)&unk);
+    ok(hres == S_OK, "QueryInterface returned: %08x\n", hres);
+
+    hres = CreateStreamOnHGlobal(NULL, TRUE, &stream);
+    ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres);
+
+    hres = CoMarshalInterface(stream, &IID_IInternetSecurityManager, unk, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
+    ok(hres == S_OK, "CoMarshalInterface returned: %08x\n", hres);
+
+    IStream_Release(stream);
+    IUnknown_Release(unk);
+    IInternetSecurityManager_Release(secmgr);
+}
+
 
 START_TEST(sec_mgr)
 {
@@ -617,6 +642,7 @@ START_TEST(sec_mgr)
     test_GetZoneActionPolicy();
     test_GetZoneAt();
     test_GetZoneAttributes();
+    test_InternetSecurityMarshalling();
 
     OleUninitialize();
 }




More information about the wine-cvs mailing list