Commit 03510be5 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

ole32: Add a test for OleLoad.

parent d0b4717c
...@@ -759,6 +759,37 @@ static void test_OleCreate(IStorage *pStorage) ...@@ -759,6 +759,37 @@ static void test_OleCreate(IStorage *pStorage)
trace("end\n"); trace("end\n");
} }
static void test_OleLoad(IStorage *pStorage)
{
HRESULT hr;
IOleObject *pObject;
static const char *methods_oleload[] =
{
"OleObject_QueryInterface",
"OleObject_AddRef",
"OleObject_QueryInterface",
"OleObject_AddRef",
"OleObject_GetMiscStatus",
"OleObject_QueryInterface",
"OleObjectPersistStg_AddRef",
"OleObjectPersistStg_Load",
"OleObjectPersistStg_Release",
"OleObject_SetClientSite",
"OleObject_Release",
"OleObject_QueryInterface",
"OleObject_Release",
NULL
};
expected_method_list = methods_oleload;
trace("OleLoad:\n");
hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject);
ok_ole_success(hr, "OleLoad");
IOleObject_Release(pObject);
ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list);
}
START_TEST(ole2) START_TEST(ole2)
{ {
DWORD dwRegister; DWORD dwRegister;
...@@ -780,6 +811,8 @@ START_TEST(ole2) ...@@ -780,6 +811,8 @@ START_TEST(ole2)
ok_ole_success(hr, "IStorage_Stat"); ok_ole_success(hr, "IStorage_Stat");
ok(IsEqualCLSID(&CLSID_Equation3, &statstg.clsid), "Wrong CLSID in storage\n"); ok(IsEqualCLSID(&CLSID_Equation3, &statstg.clsid), "Wrong CLSID in storage\n");
test_OleLoad(pStorage);
IStorage_Release(pStorage); IStorage_Release(pStorage);
hr = CoRevokeClassObject(dwRegister); hr = CoRevokeClassObject(dwRegister);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment