32#define IActiveScriptParse_QueryInterface IActiveScriptParse64_QueryInterface
33#define IActiveScriptParse_Release IActiveScriptParse64_Release
34#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
35#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
36#define IActiveScriptParseProcedure2_Release IActiveScriptParseProcedure2_64_Release
37#define IActiveScriptParseProcedure2_ParseProcedureText IActiveScriptParseProcedure2_64_ParseProcedureText
41#define IActiveScriptParse_QueryInterface IActiveScriptParse32_QueryInterface
42#define IActiveScriptParse_Release IActiveScriptParse32_Release
43#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
44#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
45#define IActiveScriptParseProcedure2_Release IActiveScriptParseProcedure2_32_Release
46#define IActiveScriptParseProcedure2_ParseProcedureText IActiveScriptParseProcedure2_32_ParseProcedureText
51 {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
53 {0xf414c262,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
55#define DEFINE_EXPECT(func) \
56 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
58#define SET_EXPECT(func) \
59 expect_ ## func = TRUE
61#define CHECK_EXPECT2(func) \
63 ok(expect_ ##func, "unexpected call " #func "\n"); \
64 called_ ## func = TRUE; \
67#define CHECK_EXPECT(func) \
69 CHECK_EXPECT2(func); \
70 expect_ ## func = FALSE; \
73#define CHECK_CALLED(func) \
75 ok(called_ ## func, "expected " #func "\n"); \
76 expect_ ## func = called_ ## func = FALSE; \
125#define DISPID_GLOBAL_TESTPROPGET 0x1000
126#define DISPID_GLOBAL_TESTPROPPUT 0x1001
127#define DISPID_GLOBAL_REPORTSUCCESS 0x1002
128#define DISPID_GLOBAL_TRACE 0x1003
129#define DISPID_GLOBAL_OK 0x1004
130#define DISPID_GLOBAL_GETVT 0x1005
131#define DISPID_GLOBAL_TESTOBJ 0x1006
132#define DISPID_GLOBAL_GETNULLBSTR 0x1007
133#define DISPID_GLOBAL_NULL_DISP 0x1008
134#define DISPID_GLOBAL_TESTTHIS 0x1009
135#define DISPID_GLOBAL_TESTTHIS2 0x100a
136#define DISPID_GLOBAL_INVOKEVERSION 0x100b
137#define DISPID_GLOBAL_CREATEARRAY 0x100c
138#define DISPID_GLOBAL_PROPGETFUNC 0x100d
139#define DISPID_GLOBAL_OBJECT_FLAG 0x100e
140#define DISPID_GLOBAL_ISWIN64 0x100f
141#define DISPID_GLOBAL_PUREDISP 0x1010
142#define DISPID_GLOBAL_ISNULLBSTR 0x1011
143#define DISPID_GLOBAL_PROPARGPUT 0x1012
144#define DISPID_GLOBAL_SHORTPROP 0x1013
145#define DISPID_GLOBAL_GETSHORT 0x1014
146#define DISPID_GLOBAL_TESTARGTYPES 0x1015
147#define DISPID_GLOBAL_INTPROP 0x1016
148#define DISPID_GLOBAL_DISPUNK 0x1017
149#define DISPID_GLOBAL_TESTRES 0x1018
150#define DISPID_GLOBAL_TESTNORES 0x1019
151#define DISPID_GLOBAL_DISPEXFUNC 0x101a
152#define DISPID_GLOBAL_TESTPROPPUTREF 0x101b
153#define DISPID_GLOBAL_GETSCRIPTSTATE 0x101c
154#define DISPID_GLOBAL_BINDEVENTHANDLER 0x101d
155#define DISPID_GLOBAL_TESTENUMOBJ 0x101e
156#define DISPID_GLOBAL_CALLEVAL 0x101f
157#define DISPID_GLOBAL_PROPARGPUTOP 0x1020
159#define DISPID_GLOBAL_TESTPROPDELETE 0x2000
160#define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001
161#define DISPID_GLOBAL_TESTPROPDELETEERROR 0x2002
163#define DISPID_TESTOBJ_PROP 0x2000
164#define DISPID_TESTOBJ_ONLYDISPID 0x2001
165#define DISPID_TESTOBJ_WITHPROP 0x2002
167#define JS_E_OUT_OF_MEMORY 0x800a03ec
168#define JS_E_INVALID_CHAR 0x800a03f6
199 if (pGetThreadUILanguage)
201 if (pGetUserDefaultUILanguage)
226#define test_grfdex(a,b) _test_grfdex(__LINE__,a,b)
263 ok(rgVar !=
NULL,
"rgVar is NULL\n");
264 ok(celt == 1,
"celt = %d\n", celt);
265 ok(pCeltFetched ==
NULL,
"pCeltFetched is not NULL\n");
297 ok(0,
"EnumVariant_Skip: unexpected call\n");
312 ok(0,
"EnumVariant_Clone: unexpected call\n");
354 ok(0,
"unexpected call\n");
368 ok(0,
"unexpected call\n");
374 VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
376 ok(0,
"unexpected call\n");
382 ok(0,
"unexpected call\n");
389 ok(0,
"unexpected call\n");
401 ok(0,
"unexpected call\n");
407 ok(0,
"unexpected call\n");
413 ok(0,
"unexpected call\n");
419 ok(0,
"unexpected call\n");
425 ok(0,
"unexpected call\n");
435 ok(pdp !=
NULL,
"pdp == NULL\n");
436 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
437 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
438 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
439 ok(pei ==
NULL,
"pei != NULL\n");
447 ok(0,
"unexpected call %x\n",
id);
461 test_grfdex(grfdex, fdexNameCaseSensitive|fdexNameImplicit);
490 ok(pspCaller !=
NULL,
"pspCaller = NULL\n");
494 ok(pdp !=
NULL,
"pdp == NULL\n");
495 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
496 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
497 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
499 ok(pei !=
NULL,
"pei == NULL\n");
502 case INVOKE_PROPERTYGET:
504 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
505 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
508 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
510 case INVOKE_FUNC|INVOKE_PROPERTYGET:
511 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
513 case DISPATCH_CONSTRUCT:
515 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
518 ok(0,
"invalid flag (%x)\n",
wFlags);
528 ok(pdp !=
NULL,
"pdp == NULL\n");
529 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
530 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
531 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
532 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
533 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
535 ok(pei !=
NULL,
"pei == NULL\n");
541 ok(pdp !=
NULL,
"pdp == NULL\n");
542 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
543 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
544 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
545 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
546 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
548 ok(pei !=
NULL,
"pei == NULL\n");
556 ok(0,
"unexpected call %x\n",
id);
567 if(!
strcmp_wa(bstrName,
"noDeleteTest")) {
600 ok(pspCaller !=
NULL,
"pspCaller = NULL\n");
606 ok(pdp !=
NULL,
"pdp == NULL\n");
607 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
608 ok(pdp->rgdispidNamedArgs !=
NULL,
"rgdispidNamedArgs != NULL\n");
609 ok(*pdp->rgdispidNamedArgs ==
DISPID_THIS,
"*rgdispidNamedArgs = %d\n", *pdp->rgdispidNamedArgs);
610 ok(pdp->cArgs == 2,
"cArgs = %d\n", pdp->cArgs);
611 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
613 ok(pei !=
NULL,
"pei == NULL\n");
615 ok(
V_VT(pdp->rgvarg+1) ==
VT_BOOL,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
630 ok(0,
"unexpected call %x\n",
id);
671 ok(cNames==1,
"cNames = %d\n", cNames);
677 }
else if(!
strcmp_wa(*rgszNames,
"noprop")) {
682 ok(0,
"unexpected call\n");
691 switch(dispIdMember) {
695 ok(pdp !=
NULL,
"pdp == NULL\n");
696 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
697 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
698 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
699 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
701 ok(ei !=
NULL,
"ei == NULL\n");
702 ok(puArgErr !=
NULL,
"puArgErr == NULL\n");
715 ok(0,
"unexpected call\n");
734 ok(0,
"unexpected call\n");
752 ok(disp !=
NULL,
"disp = NULL\n");
813 if(!
strcmp_wa(bstrName,
"reportSuccess")) {
819 if(!
strcmp_wa(bstrName,
"testPropGet")) {
825 if(!
strcmp_wa(bstrName,
"testPropPut")) {
831 if(!
strcmp_wa(bstrName,
"testPropPutRef")) {
837 if(!
strcmp_wa(bstrName,
"testPropDelete")) {
843 if(!
strcmp_wa(bstrName,
"testNoPropDelete")) {
849 if(!
strcmp_wa(bstrName,
"testPropDeleteError")) {
865 if(!
strcmp_wa(bstrName,
"getNullBSTR")) {
895 if(!
strcmp_wa(bstrName,
"invokeVersion")) {
900 if(!
strcmp_wa(bstrName,
"createArray")) {
905 if(!
strcmp_wa(bstrName,
"propGetFunc")) {
928 if(!
strcmp_wa(bstrName,
"propArgPutG")) {
935 if(!
strcmp_wa(bstrName,
"propArgPutOp")) {
942 if(!
strcmp_wa(bstrName,
"propArgPutO")) {
944 test_grfdex(grfdex, fdexNameEnsure|fdexNameCaseSensitive);
959 if(!
strcmp_wa(bstrName,
"testArgTypes")) {
989 if(!
strcmp_wa(bstrName,
"getScriptState")) {
994 if(!
strcmp_wa(bstrName,
"bindEventHandler")) {
999 if(!
strcmp_wa(bstrName,
"testEnumObj")) {
1017 ok(pspCaller !=
NULL,
"pspCaller = NULL\n");
1021 ok(
wFlags == INVOKE_FUNC ||
wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET),
"wFlags = %x\n",
wFlags);
1022 ok(pdp !=
NULL,
"pdp == NULL\n");
1023 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1024 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1025 ok(pdp->cArgs == 2,
"cArgs = %d\n", pdp->cArgs);
1026 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1027 if(
wFlags & INVOKE_PROPERTYGET)
1028 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1030 ok(!pvarRes,
"pvarRes != NULL\n");
1031 ok(pei !=
NULL,
"pei == NULL\n");
1033 ok(
V_VT(pdp->rgvarg) ==
VT_BSTR,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1034 ok(
V_VT(pdp->rgvarg+1) ==
VT_BOOL,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
1043 ok(pdp !=
NULL,
"pdp == NULL\n");
1044 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1045 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1046 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1047 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1048 ok(!pvarRes,
"pvarRes != NULL\n");
1049 ok(pei !=
NULL,
"pei == NULL\n");
1051 ok(
V_VT(pdp->rgvarg) ==
VT_BSTR,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1061 ok(pdp !=
NULL,
"pdp == NULL\n");
1062 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1063 ok(pdp->cArgs == 0,
"cArgs = %d\n", pdp->cArgs);
1064 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1066 ok(!pvarRes,
"pvarRes != NULL\n");
1067 ok(pei !=
NULL,
"pei == NULL\n");
1075 ok(pdp !=
NULL,
"pdp == NULL\n");
1076 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
1077 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1078 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1079 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1080 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1082 ok(pei !=
NULL,
"pei == NULL\n");
1093 ok(pdp !=
NULL,
"pdp == NULL\n");
1094 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1095 ok(pdp->rgdispidNamedArgs !=
NULL,
"rgdispidNamedArgs == NULL\n");
1096 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1097 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1098 ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT,
"pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
1099 ok(!pvarRes,
"pvarRes != NULL\n");
1101 ok(
V_VT(pdp->rgvarg) ==
VT_I4,
"V_VT(pdp->rgvarg)=%d\n",
V_VT(pdp->rgvarg));
1102 ok(
V_I4(pdp->rgvarg) == 1,
"V_I4(pdp->rgvarg)=%d\n",
V_I4(pdp->rgvarg));
1108 ok(
wFlags == (INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF),
"wFlags = %x\n",
wFlags);
1109 ok(pdp !=
NULL,
"pdp == NULL\n");
1110 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1111 ok(pdp->rgdispidNamedArgs !=
NULL,
"rgdispidNamedArgs == NULL\n");
1112 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1113 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1114 ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT,
"pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
1115 ok(!pvarRes,
"pvarRes != NULL\n");
1121 ok(pdp !=
NULL,
"pdp == NULL\n");
1122 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1123 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1124 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1125 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1126 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1128 ok(pei !=
NULL,
"pei == NULL\n");
1131 switch(
V_VT(pdp->rgvarg)) {
1157 ok(0,
"unknown vt %d\n",
V_VT(pdp->rgvarg));
1164 ok(pvarRes !=
NULL,
"pvarRes = NULL\n");
1167 V_BOOL(pvarRes) = VARIANT_TRUE;
1172 ok(!pvarRes,
"pvarRes != NULL\n");
1179 ok(pdp !=
NULL,
"pdp == NULL\n");
1180 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
1181 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1182 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1183 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1184 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1186 ok(pei !=
NULL,
"pei == NULL\n");
1194 ok(pdp !=
NULL,
"pdp == NULL\n");
1195 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
1196 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1197 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1198 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1199 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1201 ok(pei !=
NULL,
"pei == NULL\n");
1220 ok(pdp !=
NULL,
"pdp == NULL\n");
1221 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1222 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1223 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1224 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1225 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1227 ok(pei !=
NULL,
"pei == NULL\n");
1228 ok(
V_VT(pdp->rgvarg) ==
VT_BSTR,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1231 V_BOOL(pvarRes) =
V_BSTR(pdp->rgvarg) ? VARIANT_FALSE : VARIANT_TRUE;
1237 V_BOOL(pvarRes) =
sizeof(
void*) == 8 ? VARIANT_TRUE : VARIANT_FALSE;
1243 ok(pdp !=
NULL,
"pdp == NULL\n");
1244 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
1245 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1246 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1247 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1248 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1250 ok(pei !=
NULL,
"pei == NULL\n");
1257 ok(pdp !=
NULL,
"pdp == NULL\n");
1258 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1259 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1260 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1261 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1262 ok(pvarRes ==
NULL,
"pvarRes != NULL\n");
1263 ok(pei !=
NULL,
"pei == NULL\n");
1271 ok(pdp !=
NULL,
"pdp == NULL\n");
1272 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1273 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1274 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1275 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1276 ok(pvarRes ==
NULL,
"pvarRes != NULL\n");
1277 ok(pei !=
NULL,
"pei == NULL\n");
1287 ok(pdp !=
NULL,
"pdp == NULL\n");
1288 ok(!pdp->rgvarg,
"rgvarg != NULL\n");
1289 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1290 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1291 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1292 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1294 ok(pei !=
NULL,
"pei == NULL\n");
1307 ok(pdp !=
NULL,
"pdp == NULL\n");
1308 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1309 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1310 ok(!pdp->cArgs,
"cArgs = %d\n", pdp->cArgs);
1311 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1312 ok(pvarRes !=
NULL,
"pvarRes == NULL\n");
1314 ok(pei !=
NULL,
"pei == NULL\n");
1325 for(
i=0;
i<5;
i++) {
1326 for(
j=2;
j<4;
j++) {
1342 case INVOKE_FUNC|INVOKE_PROPERTYGET:
1343 ok(pdp->cArgs != 0,
"pdp->cArgs = %d\n", pdp->cArgs);
1344 ok(pvarRes !=
NULL,
"pdp->pvarRes == NULL\n");
1347 ok(0,
"invalid flag (%x)\n",
wFlags);
1350 ok(pdp !=
NULL,
"pdp == NULL\n");
1351 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1352 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1353 ok(pei !=
NULL,
"pei == NULL\n");
1358 V_I4(pvarRes) = pdp->cArgs;
1383 ok(pdp !=
NULL,
"pdp == NULL\n");
1384 ok(pdp->rgvarg !=
NULL,
"rgvarg != NULL\n");
1385 ok(pdp->rgdispidNamedArgs !=
NULL,
"rgdispidNamedArgs == NULL\n");
1386 ok(pdp->cArgs == 3,
"cArgs = %d\n", pdp->cArgs);
1387 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1388 ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT,
"pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
1389 ok(!pvarRes,
"pvarRes != NULL\n");
1390 ok(pei !=
NULL,
"pei == NULL\n");
1392 ok(
V_VT(pdp->rgvarg) ==
VT_I4,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1393 ok(
V_I4(pdp->rgvarg) == 2,
"V_I4(pdp->rgvarg) = %d\n",
V_I4(pdp->rgvarg));
1395 ok(
V_VT(pdp->rgvarg+1) ==
VT_I4,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
1396 ok(
V_I4(pdp->rgvarg+1) == 1,
"V_I4(pdp->rgvarg+1) = %d\n",
V_I4(pdp->rgvarg+1));
1398 ok(
V_VT(pdp->rgvarg+2) ==
VT_I4,
"V_VT(pdp->rgvarg+2) = %d\n",
V_VT(pdp->rgvarg+2));
1399 ok(
V_I4(pdp->rgvarg+2) == 0,
"V_I4(pdp->rgvarg+2) = %d\n",
V_I4(pdp->rgvarg+2));
1403 ok(pdp !=
NULL,
"pdp == NULL\n");
1404 ok(pdp->rgvarg !=
NULL,
"rgvarg != NULL\n");
1405 ok(pei !=
NULL,
"pei == NULL\n");
1408 case INVOKE_PROPERTYGET | INVOKE_FUNC:
1411 ok(pdp->cNamedArgs == 0,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1412 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1413 ok(pdp->cArgs == 2,
"cArgs = %d\n", pdp->cArgs);
1414 ok(pdp->cNamedArgs == 0,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1415 ok(pvarRes !=
NULL,
"pvarRes = NULL\n");
1417 ok(
V_VT(pdp->rgvarg) ==
VT_I4,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1418 ok(
V_I4(pdp->rgvarg) == 1,
"V_I4(pdp->rgvarg) = %d\n",
V_I4(pdp->rgvarg));
1420 ok(
V_VT(pdp->rgvarg+1) ==
VT_I4,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
1421 ok(
V_I4(pdp->rgvarg+1) == 0,
"V_I4(pdp->rgvarg+1) = %d\n",
V_I4(pdp->rgvarg+1));
1426 case INVOKE_PROPERTYPUT:
1429 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1430 ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT,
"pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
1431 ok(pdp->rgdispidNamedArgs !=
NULL,
"rgdispidNamedArgs == NULL\n");
1432 ok(pdp->cArgs == 3,
"cArgs = %d\n", pdp->cArgs);
1433 ok(pdp->cNamedArgs == 1,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1434 ok(!pvarRes,
"pvarRes != NULL\n");
1436 ok(
V_VT(pdp->rgvarg) ==
VT_I4,
"V_VT(pdp->rgvarg) = %d\n",
V_VT(pdp->rgvarg));
1437 ok(
V_I4(pdp->rgvarg) == 8,
"V_I4(pdp->rgvarg) = %d\n",
V_I4(pdp->rgvarg));
1439 ok(
V_VT(pdp->rgvarg+1) ==
VT_I4,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
1440 ok(
V_I4(pdp->rgvarg+1) == 1,
"V_I4(pdp->rgvarg+1) = %d\n",
V_I4(pdp->rgvarg+1));
1442 ok(
V_VT(pdp->rgvarg+2) ==
VT_I4,
"V_VT(pdp->rgvarg+2) = %d\n",
V_VT(pdp->rgvarg+2));
1443 ok(
V_I4(pdp->rgvarg+2) == 0,
"V_I4(pdp->rgvarg+2) = %d\n",
V_I4(pdp->rgvarg+2));
1456 hres = IDispatch_QueryInterface(
script_disp, &IID_IDispatchEx, (
void**)&dispex);
1460 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseSensitive, &
id);
1468 hres = IDispatchEx_InvokeEx(dispex,
id, lcid,
DISPATCH_METHOD, pdp, pvarRes, pei, pspCaller);
1477 hres = IDispatchEx_InvokeEx(dispex,
id, lcid, DISPATCH_CONSTRUCT, pdp, pvarRes, pei, pspCaller);
1482 hres = IDispatchEx_InvokeEx(dispex,
id, lcid, DISPATCH_CONSTRUCT, pdp,
NULL, pei, pspCaller);
1486 hres = IDispatchEx_InvokeEx(dispex,
id, lcid, DISPATCH_CONSTRUCT|
DISPATCH_PROPERTYGET, pdp, pvarRes, pei, pspCaller);
1490 hres = IDispatchEx_InvokeEx(dispex,
id, lcid,
wFlags, pdp, pvarRes, pei, pspCaller);
1493 IDispatchEx_Release(dispex);
1504 V_INT(pvarRes) = 22;
1519 ok(pdp !=
NULL,
"pdp == NULL\n");
1520 ok(pdp->rgvarg !=
NULL,
"rgvarg != NULL\n");
1521 ok(pdp->cArgs == 6,
"cArgs = %d\n", pdp->cArgs);
1522 ok(!pvarRes,
"pvarRes != NULL\n");
1524 ok(
V_VT(pdp->rgvarg+1) ==
VT_I4,
"V_VT(pdp->rgvarg+1) = %d\n",
V_VT(pdp->rgvarg+1));
1525 ok(
V_I4(pdp->rgvarg+1) == 10,
"V_I4(pdp->rgvarg+1) = %d\n",
V_I4(pdp->rgvarg+1));
1527 ok(
V_VT(pdp->rgvarg+2) ==
VT_I4,
"V_VT(pdp->rgvarg+2) = %d\n",
V_VT(pdp->rgvarg+2));
1528 ok(
V_I4(pdp->rgvarg+2) == 10,
"V_I4(pdp->rgvarg+2) = %d\n",
V_I4(pdp->rgvarg+2));
1530 ok(
V_VT(pdp->rgvarg+3) ==
VT_I4,
"V_VT(pdp->rgvarg+3) = %d\n",
V_VT(pdp->rgvarg+3));
1531 ok(
V_I4(pdp->rgvarg+3) == 22,
"V_I4(pdp->rgvarg+3) = %d\n",
V_I4(pdp->rgvarg+3));
1533 ok(
V_VT(pdp->rgvarg+4) ==
VT_I4,
"V_VT(pdp->rgvarg+4) = %d\n",
V_VT(pdp->rgvarg+4));
1534 ok(
V_I4(pdp->rgvarg+4) == 22,
"V_I4(pdp->rgvarg+4) = %d\n",
V_I4(pdp->rgvarg+4));
1577 ok(pdp !=
NULL,
"pdp == NULL\n");
1578 ok(pdp->rgvarg !=
NULL,
"rgvarg == NULL\n");
1579 ok(!pdp->rgdispidNamedArgs,
"rgdispidNamedArgs != NULL\n");
1580 ok(pdp->cArgs == 1,
"cArgs = %d\n", pdp->cArgs);
1581 ok(!pdp->cNamedArgs,
"cNamedArgs = %d\n", pdp->cNamedArgs);
1582 ok(pvarRes ==
NULL,
"pvarRes != NULL\n");
1583 ok(pei !=
NULL,
"pei == NULL\n");
1586 hres = IDispatch_QueryInterface(
V_DISPATCH(pdp->rgvarg), &IID_IDispatchEx, (
void**)&eval_func);
1587 ok(
hres ==
S_OK,
"Could not get IDispatchEx iface: %08x\n",
hres);
1602 IDispatchEx_Release(eval_func);
1607 ok(0,
"unexpected call %x\n",
id);
1624 ok(0,
"id = %d\n",
id);
1684 ok(dwReturnMask == SCRIPTINFO_IUNKNOWN,
"unexpected dwReturnMask %x\n", dwReturnMask);
1685 ok(!ppti,
"ppti != NULL\n");
1702 const VARIANT *pvarResult,
const EXCEPINFO *pexcepinfo)
1727#undef ACTSCPSITE_THIS
1747 ok(pscripterror !=
NULL,
"ActiveScriptSite_OnScriptError -- expected pscripterror to be set, got NULL\n");
1778 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptProperty,
1779 (
void**)&script_prop);
1780 ok(
hres ==
S_OK,
"Could not get IActiveScriptProperty iface: %08x\n",
hres);
1783 IActiveScriptProperty_Release(script_prop);
1795 &IID_IActiveScript, (
void**)&
script);
1803 IActiveScript_Release(
script);
1812 IActiveScriptParse *
parser;
1820 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
1821 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
1824 IActiveScript_Release(engine);
1834 hres = IActiveScript_AddNamedItem(engine,
testW,
1835 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|
flags);
1839 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
1849 IActiveScript_Release(engine);
1857 IActiveScriptParseProcedure2 *parse_proc;
1858 IActiveScriptParse *
parser;
1871 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
1872 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
1881 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
1883 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParseProcedure2, (
void**)&parse_proc);
1884 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
1889 SCRIPTPROC_HOSTMANAGESSOURCE|SCRIPTPROC_IMPLICIT_THIS|SCRIPTPROC_IMPLICIT_PARENTS, &disp);
1894 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
1895 ok(
hres ==
S_OK,
"Could not get IDispatchEx iface: %08x\n",
hres);
1896 IDispatch_Release(disp);
1902 IDispatchEx_Release(dispex);
1905 IActiveScript_Release(engine);
1913 IActiveScriptParse *
parser;
1922 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
1923 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
1926 IActiveScript_Release(engine);
1936 hres = IActiveScript_AddNamedItem(engine,
testW,
1937 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
1941 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
1945 IActiveScript_Release(engine);
1955 DWORD source_context;
1964 ok(
hres ==
S_OK,
"IActiveScriptError_GetSourcePosition -- hres: expected S_OK, got 0x%08x\n",
hres);
1966 source_context = 0xdeadbeef;
1967 hres = IActiveScriptError_GetSourcePosition(
error, &source_context,
NULL,
NULL);
1968 ok(
hres ==
S_OK,
"IActiveScriptError_GetSourcePosition -- hres: expected S_OK, got 0x%08x\n",
hres);
1969 ok(source_context == 0,
"IActiveScriptError_GetSourcePosition -- source_context: expected 0, got 0x%08x\n", source_context);
1973 ok(
hres ==
S_OK,
"IActiveScriptError_GetSourcePosition -- hres: expected S_OK, got 0x%08x\n",
hres);
1976 char_position = 0xdeadbeef;
1978 ok(
hres ==
S_OK,
"IActiveScriptError_GetSourcePosition -- hres: expected S_OK, got 0x%08x\n",
hres);
1979 ok(char_position ==
pos,
"IActiveScriptError_GetSourcePosition -- char_position: expected %d, got %d\n",
pos, char_position);
1984 ok(
hres ==
E_POINTER,
"IActiveScriptError_GetSourceLineText -- hres: expected E_POINTER, got 0x%08x\n",
hres);
1987 hres = IActiveScriptError_GetSourceLineText(
error, &linetext);
1989 ok(
hres ==
S_OK,
"IActiveScriptError_GetSourceLineText -- hres: expected S_OK, got 0x%08x\n",
hres);
1993 ok(
hres ==
E_FAIL,
"IActiveScriptError_GetSourceLineText -- hres: expected S_OK, got 0x%08x\n",
hres);
1995 "IActiveScriptError_GetSourceLineText -- expected NULL, got %s\n",
wine_dbgstr_w(linetext));
2002 ok(
hres ==
E_POINTER,
"IActiveScriptError_GetExceptionInfo -- hres: expected E_POINTER, got 0x%08x\n",
hres);
2004 excep.wCode = 0xdead;
2005 excep.wReserved = 0xdead;
2006 excep.bstrSource = (
BSTR)0xdeadbeef;
2007 excep.bstrDescription = (
BSTR)0xdeadbeef;
2008 excep.bstrHelpFile = (
BSTR)0xdeadbeef;
2009 excep.dwHelpContext = 0xdeadbeef;
2010 excep.pvReserved = (
void *)0xdeadbeef;
2011 excep.pfnDeferredFillIn = (
void *)0xdeadbeef;
2012 excep.scode = 0xdeadbeef;
2014 hres = IActiveScriptError_GetExceptionInfo(
error, &excep);
2015 ok(
hres ==
S_OK,
"IActiveScriptError_GetExceptionInfo -- hres: expected S_OK, got 0x%08x\n",
hres);
2017 ok(excep.wCode == 0,
"IActiveScriptError_GetExceptionInfo -- excep.wCode: expected 0, got 0x%08x\n", excep.wCode);
2018 ok(excep.wReserved == 0,
"IActiveScriptError_GetExceptionInfo -- excep.wReserved: expected 0, got %d\n", excep.wReserved);
2020 skip(
"Non-english UI (test with hardcoded strings)\n");
2022 ok(excep.bstrSource !=
NULL && !
lstrcmpW(excep.bstrSource, script_source),
2023 "IActiveScriptError_GetExceptionInfo -- excep.bstrSource is not valid: expected %s, got %s\n",
2026 "IActiveScriptError_GetExceptionInfo -- excep.bstrDescription is not valid: got %s\n",
wine_dbgstr_w(excep.bstrDescription));
2028 ok(excep.bstrHelpFile ==
NULL,
2029 "IActiveScriptError_GetExceptionInfo -- excep.bstrHelpFile: expected NULL, got %s\n",
wine_dbgstr_w(excep.bstrHelpFile));
2030 ok(excep.dwHelpContext == 0,
"IActiveScriptError_GetExceptionInfo -- excep.dwHelpContext: expected 0, got %d\n", excep.dwHelpContext);
2031 ok(excep.pvReserved ==
NULL,
"IActiveScriptError_GetExceptionInfo -- excep.pvReserved: expected NULL, got %p\n", excep.pvReserved);
2032 ok(excep.pfnDeferredFillIn ==
NULL,
"IActiveScriptError_GetExceptionInfo -- excep.pfnDeferredFillIn: expected NULL, got %p\n", excep.pfnDeferredFillIn);
2033 ok(excep.scode == errorcode,
"IActiveScriptError_GetExceptionInfo -- excep.scode: expected 0x%08x, got 0x%08x\n", errorcode, excep.scode);
2042 IActiveScriptParse *
parser;
2050 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2051 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2054 IActiveScript_Release(engine);
2064 hres = IActiveScript_AddNamedItem(engine,
testW,
2065 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|
flags);
2069 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2079 todo_wine ok(
hres == 0x80020101,
"parse_script_with_error should have returned 0x80020101, got: 0x%08x\n",
hres);
2090 IActiveScript_Release(engine);
2118 ok(
hres == exhres,
"parse_script failed: %08x, expected %08x\n",
hres, exhres);
2128 line_text =
a2bstr(linetext);
2152 const char *file_map;
2243 IActiveScriptParse *
parser;
2247 static const WCHAR script_textW[] =
2248 {
'v',
'a',
'r',
' ',
'v',
' ',
'=',
' ',
't',
'e',
's',
't',
'V',
'a',
'l',
';',0};
2254 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2255 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2258 IActiveScript_Release(engine);
2271 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|
2272 (global_members ? SCRIPTITEM_GLOBALMEMBERS : 0));
2278 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2290 IActiveScript_Release(engine);
2296 IActiveScriptParse *
parser;
2305 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2306 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2314 hres = IActiveScript_AddNamedItem(engine,
testW, SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
2317 str =
a2bstr(
"ok(getScriptState() === 5, \"getScriptState = \" + getScriptState());\n"
2318 "reportSuccess();");
2326 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2330 IActiveScript_Release(engine);
2337 IActiveScriptParse *
parser;
2346 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2347 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2355 hres = IActiveScript_AddNamedItem(engine,
testW, SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
2358 str =
a2bstr(
"function bindEventHandler::eventName() {}\n"
2359 "reportSuccess();");
2368 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2373 IActiveScript_Release(engine);
2380 IActiveScriptParse *
parser;
2389 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2390 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2400 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
2405 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2414 *engine_ret = engine;
2416 IActiveScript_Close(engine);
2417 IActiveScript_Release(engine);
2425 IActiveScriptParse *
parser;
2435 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2436 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2446 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
2459 hres = IActiveScript_GetScriptState(engine, &
state);
2464 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2466 hres = IActiveScript_Close(engine);
2470 IActiveScript_Release(engine);
2476 DISPPARAMS dp = {0};
2495 IDispatch_Release(disp);
2529 ok(
hres == 0x800a03fa,
"parse_script_expr failed: %08x\n",
hres);
2532 ok(
hres == 0x800a03fa,
"parse_script_expr failed: %08x\n",
hres);
2550 DISPPARAMS dp = {
NULL};
2561 hres = IDispatch_QueryInterface(
V_DISPATCH(&
v), &IID_IDispatchEx, (
void**)&dispex);
2562 ok(
hres ==
S_OK,
"Could not get IDispatchEx iface: %08x\n",
hres);
2566 hres = IDispatchEx_GetDispID(dispex,
str, 0, &func_id);
2571 hres = IDispatchEx_GetDispID(dispex,
str, 0, &prop_id);
2586 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2589 hres = IDispatchEx_GetDispID(dispex,
str, 0, &func_id);
2601 IDispatchEx_Release(dispex);
2602 IActiveScript_Release(
script);
2607 IActiveScriptParse *
parser;
2619 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
2620 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
2630 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
2635 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
2641 hres = IDispatch_QueryInterface(
script_disp, &IID_IDispatchEx, (
void**)&script_dispex);
2642 ok(
hres ==
S_OK,
"Could not get IDispatchEx iface: %08x\n",
hres);
2646 hres = IDispatchEx_GetDispID(script_dispex,
str, 0, &
id);
2672 hres = IDispatchEx_GetDispID(script_dispex,
str, 0, &v_id);
2688 " ok(x === 5, 'x = ' + x);"
2696 hres = IDispatchEx_GetDispID(script_dispex,
str, 0, &
id);
2700 IDispatchEx_Release(script_dispex);
2702 IActiveScript_Close(engine);
2703 IActiveScript_Release(engine);
2718 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
S_OK},
2719 {{0xFEFF,
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
S_OK},
2720 {{
'v',0xFEFF,
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
JS_E_OUT_OF_MEMORY},
2721 {{
'v',
'a',
'r',0xFEFF,
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
S_OK},
2722 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',0xFEFF,
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
S_OK},
2723 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',0xFEFF,
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',
')',
';',
'\0'},
JS_E_OUT_OF_MEMORY},
2724 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',0xFEFF,
'(',
')',
';',
'\0'},
S_OK},
2725 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',0xFEFF,
')',
';',
'\0'},
S_OK},
2726 {{
'v',
'a',
'r',
' ',
'a',
' ',
'=',0xFEFF,
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',0xFEFF,
')',
';',
'\0'},
S_OK},
2727 {{0xFEFF,
'v',
'a',
'r',
' ',
'a',
' ',
'=',0xFEFF,0xFEFF,
' ',
'1',
';',
' ',
'r',
'e',
'p',
'o',
'r',
't',
'S',
'u',
'c',
'c',
'e',
's',
's',
'(',0xFEFF,
')',
';',
'\0'},
S_OK},
2733 for (
i = 0; bom_tests[
i].
str[0];
i++)
2765 win_skip(
"Could not create script\n");
2768 IActiveScript_Release(
script);
2807 parse_script_a(
"ok((delete testObj.deleteTest) === true, 'delete testObj.deleteTest did not return true');");
2811 parse_script_a(
"ok((delete testObj.noDeleteTest) === false, 'delete testObj.noDeleteTest did not return false');");
2816 parse_script_a(
"ok((delete testPropDelete) === true, 'delete testPropDelete did not return true');");
2822 parse_script_a(
"ok((delete testNoPropDelete) === false, 'delete testPropDelete did not return false');");
2833 parse_script_a(
"ok((delete pureDisp.prop) === false, 'delete pureDisp.prop did not return true');");
2837 parse_script_a(
"ok((delete pureDisp.noprop) === true, 'delete pureDisp.noprop did not return false');");
2853 parse_script_a(
"var t = {func: dispexFunc}; t = t.func(false);");
2857 parse_script_a(
"Function.prototype.apply.call(dispexFunc, testObj, [true]);");
2861 parse_script_a(
"Function.prototype.apply.call(pureDisp, testObj, [true]);");
2866 parse_script_a(
"ok(typeof(test) === 'object', \"typeof(test) != 'object'\");");
2890 parse_script_a(
"(function () { eval('var testPropGet;'); })();");
2893 parse_script_a(
"ok(propGetFunc() == 0, \"Incorrect propGetFunc value\");");
2895 parse_script_a(
"ok(propGetFunc(1) == 1, \"Incorrect propGetFunc value\");");
2896 parse_script_a(
"ok(propGetFunc(1, 2) == 2, \"Incorrect propGetFunc value\");");
2898 parse_script_a(
"ok(propGetFunc().toString() == 0, \"Incorrect propGetFunc value\");");
2900 parse_script_a(
"ok(propGetFunc(1).toString() == 1, \"Incorrect propGetFunc value\");");
2907 parse_script_a(
"(function() { var tmp = (function () { return testObj; })()(1);})();");
2908 parse_script_a(
"(function() { var tmp = (function () { return testObj; })()();})();");
2910 parse_script_a(
"ok((testObj instanceof Object) === false, 'testObj is instance of Object');");
2913 parse_script_a(
"ok(('prop' in testObj) === true, 'prop is not in testObj');");
2917 parse_script_a(
"ok(('noprop' in testObj) === false, 'noprop is in testObj');");
2921 parse_script_a(
"ok(Object.prototype.hasOwnProperty.call(testObj, 'prop') === true, 'hasOwnProperty(\\\"prop\\\") returned false');");
2925 parse_script_a(
"ok(Object.prototype.hasOwnProperty.call(testObj, 'noprop') === false, 'hasOwnProperty(\\\"noprop\\\") returned true');");
2929 parse_script_a(
"ok(Object.prototype.hasOwnProperty.call(pureDisp, 'prop') === true, 'hasOwnProperty(\\\"noprop\\\") returned false');");
2933 parse_script_a(
"ok(Object.prototype.hasOwnProperty.call(pureDisp, 'noprop') === false, 'hasOwnProperty(\\\"noprop\\\") returned true');");
2937 parse_script_a(
"ok(String(testObj) === '1', 'wrong testObj value');");
2941 parse_script_a(
"ok(String.prototype.concat.call(testObj, ' OK') === '1 OK', 'wrong concat result');");
2969 parse_script_a(
"var t = {func: function () { ok(this === t, 'this !== t'); }}; with(t) { func(); }");
2970 parse_script_a(
"function x() { testThis(this); }; with({y: 1}) { x(); }");
2971 parse_script_a(
"(function () { function x() { testThis(this);} x(); })();");
2975 parse_script_a(
"ok(typeof(testObj.onlyDispID) === 'unknown', 'unexpected typeof(testObj.onlyDispID)');");
3008 parse_script_a(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp,"
3009 "function(i1,ui1,ui2,r4,i4ref,ui4,nullunk,d,i,s) {"
3010 " ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
3011 " ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
3012 " ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
3013 " ok(getVT(nullunk) === 'VT_DISPATCH', 'getVT(nullunk) = ' + getVT(nullunk));"
3014 " ok(nullunk === null, 'nullunk !== null');"
3015 " ok(getVT(ui4) === 'VT_R8', 'getVT(ui4) = ' + getVT(ui4));"
3016 " ok(ui4 > 0, 'ui4 = ' + ui4);"
3017 " ok(getVT(i4ref) === 'VT_I4', 'getVT(i4ref) = ' + getVT(i4ref));"
3018 " ok(i4ref === 2, 'i4ref = ' + i4ref);"
3019 " ok(r4 === 0.5, 'r4 = ' + r4);"
3020 " ok(getVT(r4) === 'VT_R8', 'getVT(r4) = ' + getVT(r4));"
3021 " ok(getVT(ui2) === 'VT_I4', 'getVT(ui2) = ' + getVT(ui2));"
3022 " ok(getVT(ui1) === 'VT_I4', 'getVT(ui1) = ' + getVT(ui1));"
3023 " ok(ui1 === 4, 'ui1 = ' + ui1);"
3024 " ok(getVT(i1) === 'VT_I4', 'getVT(i1) = ' + getVT(i1));"
3025 " ok(i1 === 5, 'i1 = ' + i1);"
3031 parse_script_a(
"var t = (function () { with(testObj) { return withProp; }})(); ok(t === 1, 't = ' + t);");
3039 parse_script_a(
"@if(true)\nif(@_jscript) reportSuccess();\n@end");
3057 " var testEnumObj = new Enumerator(testObj);"
3058 " var tmp = testEnumObj.moveFirst();"
3059 " ok(tmp == undefined, \"testEnumObj.moveFirst() = \" + tmp);"
3071 " var testEnumObj = new Enumerator(testObj);"
3072 " while (!testEnumObj.atEnd())"
3074 " ok(testEnumObj.item() == 123, "
3075 " \"testEnumObj.item() = \"+testEnumObj.item());"
3076 " testEnumObj.moveNext();"
3107 ok(
hres !=
S_OK,
"ParseScriptText have not failed\n");
3116 "Microsoft JScript compilation error",
3121 "var a=1;\nif(a\n-->0) a=5;\n",
3123 "Microsoft JScript compilation error",
3130 "Microsoft JScript runtime error",
3131 "Object doesn't support this action",
3137 "Microsoft JScript runtime error",
3142 "var a;\nnew null;",
3144 "Microsoft JScript runtime error",
3151 "Microsoft JScript runtime error",
3163 DISPPARAMS dp = {
args};
3214 parse_script_a(
"#@~^GQAAAA==@#@&d.\x7fwKDYUE1^+k/c#p@#@&OAYAAA==^#~@");
3219 src =
a2bstr(
"#@~^EAA*AA==.\x7fwGMYUEm1+kd`*iAQYAAA==^#~@");
3225 src =
a2bstr(
"#@~^EAAAAAAA==.\x7fwGMYUEm1+kd`*iAQYAAA==^#~@");
3231 src =
a2bstr(
"#@~^EAAAAA^=.\x7fwGMYUEm1+kd`*iAQYAAA==^#~@");
3237 src =
a2bstr(
"#@~^EAAAAA==.\x7fwGMYUEm1ekd`*iAQYAAA==^#~@");
3243 src =
a2bstr(
"#@~^EAAAAA==.\x7fwGMYUEm1+kd`*iAQYAAA==^~#@");
3251 IActiveScriptParse *
parser;
3261 hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (
void**)&
parser);
3262 ok(
hres ==
S_OK,
"Could not get IActiveScriptParse: %08x\n",
hres);
3264 IActiveScript_Release(engine);
3274 hres = IActiveScript_AddNamedItem(engine,
testW,
3275 SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE);
3279 ok(
hres ==
S_OK,
"SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n",
hres);
3290 IActiveScript_Release(engine);
3297 trace(
"Running benchmarks...\n");
3311 &IID_IActiveScriptProperty, (
void**)&script_prop);
3314 IActiveScriptProperty_Release(script_prop);
3316 str =
a2bstr(
"if(!('localeCompare' in String.prototype)) throw 1;");
3333 win_skip(
"Broken engine, probably too old\n");
3334 }
else if(
argc > 2) {
3338 trace(
"invoke version 0\n");
3342 trace(
"invoke version 2\n");
3345 trace(
"JSctipt.Encode tests...\n");
3347 trace(
"ParseProcedureText tests...\n");
@ SCRIPTSTATE_INITIALIZED
@ SCRIPTSTATE_UNINITIALIZED
enum tagSCRIPTSTATE SCRIPTSTATE
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define CreateFileA(a, b, c, d, e, f, g)
#define WideCharToMultiByte
#define MultiByteToWideChar
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTickCount(VOID)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
LCID WINAPI GetUserDefaultLCID(void)
LANGID WINAPI GetUserDefaultLangID(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static const WCHAR desc[]
static void test_isvisible(void)
#define parse_script_a(p, s)
static BOOL check_jscript(void)
static HRESULT WINAPI testObj_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
static HRESULT WINAPI pureDisp_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface)
#define test_grfdex(a, b)
static BOOL run_tests(void)
static void test_invokeex(void)
#define DISPID_GLOBAL_NULL_DISP
#define DISPID_GLOBAL_INTPROP
#define DISPID_GLOBAL_PROPARGPUTOP
static HRESULT WINAPI pureDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static void test_eval(void)
static HRESULT WINAPI ActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface)
#define JS_E_INVALID_CHAR
static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
#define DISPID_GLOBAL_OBJECT_FLAG
static HRESULT WINAPI bindEventHandlerDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static HRESULT WINAPI BindEventHandler_QueryInterface(IBindEventHandler *iface, REFIID riid, void **ppv)
#define DISPID_GLOBAL_TESTTHIS2
#define DISPID_GLOBAL_ISWIN64
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *res, EXCEPINFO *pei, IServiceProvider *pspCaller)
static const IActiveScriptSiteVtbl ActiveScriptSite_CheckErrorVtbl
static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
#define DISPID_GLOBAL_TESTPROPPUTREF
static HRESULT WINAPI EnumVARIANT_Skip(IEnumVARIANT *This, ULONG celt)
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
static const WCHAR testW[]
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static const CLSID CLSID_JScript
static IActiveScript * script_engine
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
static ULONG WINAPI EnumVARIANT_Release(IEnumVARIANT *iface)
#define DISPID_GLOBAL_TESTNOPROPDELETE
static const CHAR testA[]
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
static HRESULT WINAPI pureDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *res, EXCEPINFO *ei, UINT *puArgErr)
static IDispatchExVtbl pureDispVtbl
static IDispatchExVtbl GlobalVtbl
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
#define JS_E_OUT_OF_MEMORY
#define DISPID_GLOBAL_DISPEXFUNC
#define DISPID_GLOBAL_TESTRES
static IDispatchEx pureDisp
static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
#define IActiveScriptParseProcedure2_ParseProcedureText
#define CHECK_EXPECT(func)
static HRESULT WINAPI ActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion)
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
#define DISPID_TESTOBJ_WITHPROP
static void test_IActiveScriptError(IActiveScriptError *error, SCODE errorcode, ULONG line, LONG pos, BSTR script_source, BSTR description, BSTR line_text)
static HRESULT WINAPI EnumVARIANT_Clone(IEnumVARIANT *This, IEnumVARIANT **ppEnum)
#define DEFINE_EXPECT(func)
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
static HRESULT WINAPI testObj_Invoke(IDispatchEx *iface, DISPID id, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, UINT *puArgErr)
#define IActiveScriptParse_InitNew
#define DISPID_GLOBAL_REPORTSUCCESS
static BOOL is_lang_english(void)
static HRESULT WINAPI EnumVARIANT_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppv)
#define IActiveScriptParse_ParseScriptText
#define DISPID_GLOBAL_TESTOBJ
#define IActiveScriptParseProcedure2_Release
static HRESULT parse_script_expr(const char *expr, VARIANT *res, IActiveScript **engine_ret)
#define DISPID_TESTOBJ_PROP
#define IActiveScriptParse_Release
static HRESULT WINAPI EnumVARIANT_Reset(IEnumVARIANT *This)
#define DISPID_GLOBAL_TESTARGTYPES
#define DISPID_GLOBAL_TRACE
static BSTR a2bstr(const char *str)
static void test_parse_proc(void)
static int strcmp_wa(LPCWSTR strw, const char *stra)
#define DISPID_GLOBAL_CREATEARRAY
static IDispatchExVtbl bindEventHandlerDispVtbl
static IDispatchEx dispexFunc
static void parse_script_with_error_a(const char *src, SCODE errorcode, ULONG line, LONG pos, LPCSTR source, LPCSTR desc, LPCSTR linetext)
#define DISPID_GLOBAL_PUREDISP
#define DISPID_GLOBAL_TESTPROPGET
#define DISPID_GLOBAL_SHORTPROP
#define DISPID_GLOBAL_TESTPROPDELETE
static HRESULT invoke_procedure(const char *argsa, const char *sourcea, DISPPARAMS *dp)
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
static IBindEventHandler BindEventHandler
static HRESULT parse_script(DWORD flags, BSTR script_str)
#define DISPID_GLOBAL_TESTTHIS
static HRESULT WINAPI Global_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
static IDispatch * script_disp
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static HRESULT WINAPI dispexFunc_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *res, EXCEPINFO *pei, IServiceProvider *pspCaller)
static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv)
static HRESULT parse_htmlscript(BSTR script_str)
static void run_from_res(const char *name)
static void run_benchmarks(void)
#define DISPID_GLOBAL_TESTPROPPUT
#define DISPID_GLOBAL_TESTNORES
static int EnumVARIANT_next_0_count
static IEnumVARIANT testEnumVARIANT
static IDispatchEx bindEventHandlerDisp
static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect)
static const WCHAR emptyW[]
static IActiveScriptSite ActiveScriptSite_CheckError
static void test_retval(void)
static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
static HRESULT WINAPI EnumVARIANT_Next(IEnumVARIANT *This, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched)
static int invoke_version
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
#define DISPID_GLOBAL_GETVT
static void test_script_exprs(void)
static IEnumVARIANTVtbl testEnumVARIANTVtbl
static HRESULT WINAPI ActiveScriptSite_OnScriptError_CheckError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
#define CHECK_CALLED(func)
#define DISPID_GLOBAL_PROPGETFUNC
static ULONG WINAPI ActiveScriptSite_AddRef(IActiveScriptSite *iface)
static const char * test_name
static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
static const CLSID CLSID_JScriptEncode
static HRESULT WINAPI ActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
static void run_encoded_tests(void)
#define DISPID_GLOBAL_PROPARGPUT
#define DISPID_GLOBAL_BINDEVENTHANDLER
static int EnumVARIANT_index
#define DISPID_GLOBAL_TESTENUMOBJ
static void run_benchmark(const char *script_name)
static BSTR load_res(const char *name)
#define DISPID_GLOBAL_GETSHORT
static ULONG WINAPI EnumVARIANT_AddRef(IEnumVARIANT *iface)
static IDispatchExVtbl dispexFuncVtbl
static void run_from_file(const char *filename)
#define DISPID_GLOBAL_DISPUNK
static void test_default_value(void)
static const CLSID * engine_clsid
static const WCHAR test_valW[]
static const IBindEventHandlerVtbl BindEventHandlerVtbl
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
#define DISPID_GLOBAL_CALLEVAL
static void parse_script_with_error(DWORD flags, BSTR script_str, SCODE errorcode, ULONG line, LONG pos, BSTR script_source, BSTR description, BSTR line_text)
static void parse_script_af(DWORD flags, const char *src)
static ULONG WINAPI BindEventHandler_Release(IBindEventHandler *iface)
static IActiveScriptError * script_error
static IDispatchEx testObj
static void parse_script_ae(const char *src, HRESULT exhres)
static const IActiveScriptSiteVtbl ActiveScriptSiteVtbl
static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
static BSTR get_script_from_file(const char *filename)
#define DISPID_GLOBAL_TESTPROPDELETEERROR
static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid)
static HRESULT WINAPI BindEventHandler_BindHandler(IBindEventHandler *iface, const WCHAR *event, IDispatch *disp)
static IActiveScript * create_script(void)
static HRESULT set_script_prop(IActiveScript *engine, DWORD property, VARIANT *val)
#define DISPID_GLOBAL_GETSCRIPTSTATE
static const CHAR test_valA[]
#define DISPID_GLOBAL_INVOKEVERSION
#define DISPID_GLOBAL_GETNULLBSTR
static IDispatchEx Global
static void run_bom_tests(void)
static IActiveScriptSite ActiveScriptSite
static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
#define DISPID_TESTOBJ_ONLYDISPID
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
static IDispatchExVtbl testObjVtbl
#define DISPID_GLOBAL_ISNULLBSTR
static void test_automagic(void)
static BOOL strict_dispid_check
static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
static void test_start(void)
static ULONG WINAPI BindEventHandler_AddRef(IBindEventHandler *iface)
static const char * strw(LPCWSTR x)
static HINSTANCE hkernel32
static VARIANTARG static DISPID
#define parse_htmlscript_a(a)
static const char * script_name
#define FILE_ATTRIBUTE_READONLY
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define DISPATCH_PROPERTYGET
#define IsEqualGUID(rguid1, rguid2)
int winetest_get_mainargs(char ***pargv)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define DISP_E_MEMBERNOTFOUND
#define DISP_E_UNKNOWNNAME