Author: akhaldi
Date: Fri Nov 20 10:28:29 2015
New Revision: 69953
URL:
http://svn.reactos.org/svn/reactos?rev=69953&view=rev
Log:
[JSCRIPT_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/rostests/winetests/jscript/run.c
Modified: trunk/rostests/winetests/jscript/run.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/run.c?r…
==============================================================================
--- trunk/rostests/winetests/jscript/run.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/run.c [iso-8859-1] Fri Nov 20 10:28:29 2015
@@ -91,6 +91,7 @@
DEFINE_EXPECT(global_propputref_i);
DEFINE_EXPECT(global_propdelete_d);
DEFINE_EXPECT(global_nopropdelete_d);
+DEFINE_EXPECT(global_propdeleteerror_d);
DEFINE_EXPECT(global_success_d);
DEFINE_EXPECT(global_success_i);
DEFINE_EXPECT(global_notexists_d);
@@ -117,6 +118,7 @@
DEFINE_EXPECT(invoke_func);
DEFINE_EXPECT(DeleteMemberByDispID);
DEFINE_EXPECT(DeleteMemberByDispID_false);
+DEFINE_EXPECT(DeleteMemberByDispID_error);
DEFINE_EXPECT(BindHandler);
#define DISPID_GLOBAL_TESTPROPGET 0x1000
@@ -150,8 +152,9 @@
#define DISPID_GLOBAL_GETSCRIPTSTATE 0x101c
#define DISPID_GLOBAL_BINDEVENTHANDLER 0x101d
-#define DISPID_GLOBAL_TESTPROPDELETE 0x2000
-#define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001
+#define DISPID_GLOBAL_TESTPROPDELETE 0x2000
+#define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001
+#define DISPID_GLOBAL_TESTPROPDELETEERROR 0x2002
#define DISPID_TESTOBJ_PROP 0x2000
#define DISPID_TESTOBJ_ONLYDISPID 0x2001
@@ -714,6 +717,12 @@
CHECK_EXPECT(global_nopropdelete_d);
test_grfdex(grfdex, fdexNameCaseSensitive);
*pid = DISPID_GLOBAL_TESTNOPROPDELETE;
+ return S_OK;
+ }
+ if(!strcmp_wa(bstrName, "testPropDeleteError")) {
+ CHECK_EXPECT(global_propdeleteerror_d);
+ test_grfdex(grfdex, fdexNameCaseSensitive);
+ *pid = DISPID_GLOBAL_TESTPROPDELETEERROR;
return S_OK;
}
if(!strcmp_wa(bstrName, "getVT")) {
@@ -1368,6 +1377,9 @@
case DISPID_GLOBAL_TESTNOPROPDELETE:
CHECK_EXPECT(DeleteMemberByDispID_false);
return S_FALSE;
+ case DISPID_GLOBAL_TESTPROPDELETEERROR:
+ CHECK_EXPECT(DeleteMemberByDispID_error);
+ return E_FAIL;
default:
ok(0, "id = %d\n", id);
}
@@ -1853,6 +1865,17 @@
static void parse_script_a(const char *src)
{
parse_script_af(SCRIPTITEM_GLOBALMEMBERS, src);
+}
+
+static void parse_script_ae(const char *src, HRESULT exhres)
+{
+ BSTR tmp;
+ HRESULT hres;
+
+ tmp = a2bstr(src);
+ hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, tmp);
+ SysFreeString(tmp);
+ ok(hres == exhres, "parse_script failed: %08x, expected %08x\n", hres,
exhres);
}
static void parse_script_with_error_a(const char *src, SCODE errorcode, ULONG line, LONG
pos, LPCSTR source, LPCSTR desc, LPCSTR linetext)
@@ -2455,6 +2478,12 @@
CHECK_CALLED(global_nopropdelete_d);
CHECK_CALLED(DeleteMemberByDispID_false);
+ SET_EXPECT(global_propdeleteerror_d);
+ SET_EXPECT(DeleteMemberByDispID_error);
+ parse_script_ae("delete testPropDeleteError;", E_FAIL);
+ CHECK_CALLED(global_propdeleteerror_d);
+ CHECK_CALLED(DeleteMemberByDispID_error);
+
SET_EXPECT(puredisp_prop_d);
parse_script_a("ok((delete pureDisp.prop) === false, 'delete pureDisp.prop
did not return true');");
CHECK_CALLED(puredisp_prop_d);