Commit 9d92ea3b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

scrobj: Run scripts when creating a scriptlet instance.

parent e50eae9d
......@@ -1032,8 +1032,16 @@ static HRESULT create_scriptlet_instance(struct scriptlet_factory *factory, IDis
hres = create_script_host(factory_host->language, factory_host->active_script, &obj->hosts, &host);
if (FAILED(hres)) break;
host->object = obj;
hres = IActiveScript_AddNamedItem(host->active_script, L"scriptlet",
SCRIPTITEM_ISVISIBLE | SCRIPTITEM_GLOBALMEMBERS);
if (FAILED(hres)) break;
hres = IActiveScript_AddNamedItem(host->active_script, L"globals", SCRIPTITEM_ISVISIBLE);
if (FAILED(hres)) break;
}
if (SUCCEEDED(hres)) hres = parse_scripts(factory, &obj->hosts, TRUE);
if (FAILED(hres))
{
IDispatchEx_Release(&obj->IDispatchEx_iface);
......
......@@ -783,9 +783,7 @@ static void test_create_object(void)
CHECK_CALLED(QI_IActiveScriptParse);
CHECK_CALLED(InitNew);
CHECK_CALLED(SetScriptSite);
todo_wine
CHECK_CALLED(AddNamedItem_scriptlet);
todo_wine
CHECK_CALLED(AddNamedItem_globals);
todo_wine
CHECK_CALLED(GetScriptDispatch);
......@@ -793,9 +791,7 @@ static void test_create_object(void)
CHECK_CALLED(GetDispID_vbAddOne);
todo_wine
CHECK_CALLED(GetDispID_wtTest);
todo_wine
CHECK_CALLED(SetScriptState_STARTED);
todo_wine
CHECK_CALLED(ParseScriptText);
hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp);
......@@ -945,9 +941,7 @@ static void test_create_object(void)
CHECK_CALLED(QI_IActiveScriptParse);
CHECK_CALLED(InitNew);
CHECK_CALLED(SetScriptSite);
todo_wine
CHECK_CALLED(AddNamedItem_scriptlet);
todo_wine
CHECK_CALLED(AddNamedItem_globals);
todo_wine
CHECK_CALLED(GetScriptDispatch);
......@@ -955,9 +949,7 @@ static void test_create_object(void)
CHECK_CALLED(GetDispID_vbAddOne);
todo_wine
CHECK_CALLED(GetDispID_wtTest);
todo_wine
CHECK_CALLED(SetScriptState_STARTED);
todo_wine
CHECK_CALLED(ParseScriptText);
SET_EXPECT(SetScriptState_UNINITIALIZED);
......@@ -981,9 +973,7 @@ static void test_create_object(void)
CHECK_CALLED(Clone);
CHECK_CALLED(QI_IActiveScriptParse);
CHECK_CALLED(SetScriptSite);
todo_wine
CHECK_CALLED(AddNamedItem_scriptlet);
todo_wine
CHECK_CALLED(AddNamedItem_globals);
todo_wine
CHECK_CALLED(GetScriptDispatch);
......@@ -991,7 +981,6 @@ static void test_create_object(void)
CHECK_CALLED(GetDispID_vbAddOne);
todo_wine
CHECK_CALLED(GetDispID_wtTest);
todo_wine
CHECK_CALLED(SetScriptState_STARTED);
SET_EXPECT(SetScriptState_UNINITIALIZED);
......
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