diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index a86711a7d84..d8c54677f11 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -100,6 +100,7 @@ DEFINE_EXPECT(Next); DEFINE_EXPECT(GetWindow); DEFINE_EXPECT(GetUIBehavior); DEFINE_EXPECT(EnableModeless); +DEFINE_EXPECT(OnScriptError); #define DISPID_GLOBAL_REPORTSUCCESS 1000 #define DISPID_GLOBAL_TRACE 1001 @@ -138,6 +139,7 @@ static const char *test_name = "(null)"; static int test_counter; static SCRIPTUICHANDLING uic_handling = SCRIPTUICHANDLING_NOUIERROR; static IDispatchEx testObj; +static HRESULT onerror_hres = E_NOTIMPL; static BSTR a2bstr(const char *str) { @@ -1623,7 +1625,12 @@ static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, S static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) { - return E_NOTIMPL; + HRESULT hr = onerror_hres; + CHECK_EXPECT(OnScriptError); + + onerror_hres = E_NOTIMPL; + + return hr; } static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface) @@ -1927,18 +1934,22 @@ static void test_msgbox(void) SET_EXPECT(GetUIBehavior); SET_EXPECT(GetWindow); SET_EXPECT(EnableModeless); + SET_EXPECT(OnScriptError); hres = parse_script_ar("MsgBox \"testing...\""); ok(FAILED(hres), "script not failed\n"); CHECK_CALLED(GetUIBehavior); CHECK_CALLED(GetWindow); CHECK_CALLED(EnableModeless); + todo_wine CHECK_CALLED(OnScriptError); uic_handling = SCRIPTUICHANDLING_NOUIERROR; SET_EXPECT(GetUIBehavior); + SET_EXPECT(OnScriptError); hres = parse_script_ar("MsgBox \"testing...\""); ok(FAILED(hres), "script not failed\n"); CHECK_CALLED(GetUIBehavior); + todo_wine CHECK_CALLED(OnScriptError); } static HRESULT test_global_vars_ref(BOOL use_close) @@ -2184,8 +2195,10 @@ static void run_tests(void) parse_htmlscript_a("\n"); parse_htmlscript_a("\n\n"); + SET_EXPECT(OnScriptError); hres = parse_script_ar("