jscript/tests: Don't crash if we fail to get the IActiveScriptParse interface.
This commit is contained in:
parent
b11507ebca
commit
57a1a147a6
|
@ -295,6 +295,11 @@ static void test_jscript(void)
|
|||
|
||||
hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse);
|
||||
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
IActiveScript_Release(script);
|
||||
return;
|
||||
}
|
||||
|
||||
test_state(script, SCRIPTSTATE_UNINITIALIZED);
|
||||
test_safety(unk);
|
||||
|
@ -366,6 +371,11 @@ static void test_jscript2(void)
|
|||
|
||||
hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse);
|
||||
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
IActiveScript_Release(script);
|
||||
return;
|
||||
}
|
||||
|
||||
test_state(script, SCRIPTSTATE_UNINITIALIZED);
|
||||
|
||||
|
|
|
@ -574,6 +574,11 @@ static void parse_script(BSTR script_str)
|
|||
|
||||
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
|
||||
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
IActiveScript_Release(engine);
|
||||
return;
|
||||
}
|
||||
|
||||
hres = IActiveScriptParse_InitNew(parser);
|
||||
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
|
||||
|
@ -696,6 +701,11 @@ static void test_isvisible(BOOL global_members)
|
|||
|
||||
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
|
||||
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
IActiveScript_Release(engine);
|
||||
return;
|
||||
}
|
||||
|
||||
hres = IActiveScriptParse_InitNew(parser);
|
||||
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
|
||||
|
|
Loading…
Reference in New Issue