Author: akhaldi
Date: Wed Apr 23 13:44:00 2014
New Revision: 62900
URL:
http://svn.reactos.org/svn/reactos?rev=62900&view=rev
Log:
[JSCRIPT_WINETEST]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/rostests/winetests/jscript/activex.c
trunk/rostests/winetests/jscript/api.js
trunk/rostests/winetests/jscript/lang.js
trunk/rostests/winetests/jscript/run.c
Modified: trunk/rostests/winetests/jscript/activex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/activex…
==============================================================================
--- trunk/rostests/winetests/jscript/activex.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/activex.c [iso-8859-1] Wed Apr 23 13:44:00 2014
@@ -124,18 +124,6 @@
#define DISPID_GLOBAL_OK 0x2000
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
-}
-
static BSTR a2bstr(const char *str)
{
BSTR ret;
@@ -441,7 +429,7 @@
CHECK_EXPECT(CreateInstance);
ok(!outer, "outer = %p\n", outer);
- ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
wine_dbgstr_guid(riid));
if(SUCCEEDED(CreateInstance_hres))
*ppv = &testObj;
@@ -497,7 +485,7 @@
ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy);
ok(pContext != NULL, "pContext == NULL\n");
ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext);
- ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n",
debugstr_guid((const IID*)pContext));
+ ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n",
wine_dbgstr_guid((const IID*)pContext));
ok(!dwFlags, "dwFlags = %x\n", dwFlags);
ok(!dwReserved, "dwReserved = %x\n", dwReserved);
@@ -514,7 +502,7 @@
CHECK_EXPECT(QueryCustomPolicy);
- ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey =
%s\n", debugstr_guid(guidKey));
+ ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey =
%s\n", wine_dbgstr_guid(guidKey));
ok(ppPolicy != NULL, "ppPolicy == NULL\n");
ok(pcbPolicy != NULL, "pcbPolicy == NULL\n");
@@ -579,13 +567,13 @@
CHECK_EXPECT(Host_QS_SecMgr);
else
CHECK_EXPECT(Caller_QS_SecMgr);
- ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected
riid %s\n", debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected
riid %s\n", wine_dbgstr_guid(riid));
if(SUCCEEDED(QS_SecMgr_hres))
*ppv = &InternetHostSecurityManager;
return QS_SecMgr_hres;
}
- ok(0, "unexpected service %s\n", debugstr_guid(guidService));
+ ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
return E_NOINTERFACE;
}
@@ -1096,7 +1084,7 @@
DWORD res;
if(!init) {
- RegDeleteKey(HKEY_CLASSES_ROOT, key_name);
+ RegDeleteKeyA(HKEY_CLASSES_ROOT, key_name);
return TRUE;
}
@@ -1163,11 +1151,12 @@
CoInitialize(NULL);
if(check_jscript()) {
- register_activex();
-
- test_ActiveXObject();
-
- init_registry(FALSE);
+ if(register_activex()) {
+ test_ActiveXObject();
+ init_registry(FALSE);
+ }else {
+ skip("Could not register ActiveX object\n");
+ }
}else {
win_skip("Broken engine, probably too old\n");
}
Modified: trunk/rostests/winetests/jscript/api.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/api.js?…
==============================================================================
--- trunk/rostests/winetests/jscript/api.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/api.js [iso-8859-1] Wed Apr 23 13:44:00 2014
@@ -2357,6 +2357,13 @@
testSyntaxError("ok(false, 'unexpected execution'); some_label: {
while(true) continue some_label; }", "E_INVALID_CONTINUE");
testSyntaxError("ok(false, 'unexpected execution'); some_label: {
some_label: while(true); }", "E_LABEL_REDEFINED");
testSyntaxError("return;", "E_MISPLACED_RETURN");
+testSyntaxError("001.5;", "E_SEMICOLON");
+testSyntaxError("001.5", "E_SEMICOLON");
+testSyntaxError("0a", "E_SEMICOLON");
+testSyntaxError("01a", "E_SEMICOLON");
+testSyntaxError("0x1r", "E_SEMICOLON");
+testSyntaxError("1a", "E_SEMICOLON");
+testSyntaxError("1_", "E_SEMICOLON");
// ReferenceError tests
testException(function() {test = function() {}}, "E_ILLEGAL_ASSIGN");
Modified: trunk/rostests/winetests/jscript/lang.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/lang.js…
==============================================================================
--- trunk/rostests/winetests/jscript/lang.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/lang.js [iso-8859-1] Wed Apr 23 13:44:00 2014
@@ -37,6 +37,17 @@
ok(1000000*1000000 === 1000000000000, "1000000*1000000 === 1000000000000 is
false");
ok(8.64e15 === 8640000000000000, "8.64e15 !== 8640000000000000");
ok(1e2147483648 === Infinity, "1e2147483648 !== Infinity");
+
+ok(00 === 0, "00 != 0");
+ok(010 === 8, "010 != 8");
+ok(077 === 63, "077 != 63");
+ok(080 === 80, "080 != 80");
+ok(090 === 90, "090 != 90");
+ok(018 === 18, "018 != 18");
+tmp = 07777777777777777777777;
+ok(typeof(tmp) === "number" && tmp > 0xffffffff, "tmp = "
+ tmp);
+tmp = 07777777779777777777777;
+ok(typeof(tmp) === "number" && tmp > 0xffffffff, "tmp = "
+ tmp);
ok(1 !== 2, "1 !== 2 is false");
ok(null !== undefined, "null !== undefined is false");
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] Wed Apr 23 13:44:00 2014
@@ -1163,7 +1163,7 @@
return S_OK;
case DISPID_GLOBAL_TESTARGTYPES: {
- VARIANT args[3];
+ VARIANT args[4];
DISPPARAMS dp = {args, NULL, sizeof(args)/sizeof(*args), 0};
HRESULT hres;
@@ -1197,6 +1197,8 @@
V_INT(args+1) = 22;
V_VT(args+2) = VT_UNKNOWN;
V_UNKNOWN(args+2) = (IUnknown*)&testObj;
+ V_VT(args+3) = VT_UNKNOWN;
+ V_UNKNOWN(args+3) = NULL;
hres = IDispatch_Invoke(V_DISPATCH(pdp->rgvarg), DISPID_VALUE, &IID_NULL,
0, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
@@ -1746,7 +1748,7 @@
size = GetFileSize(file, NULL);
- map = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL);
+ map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
CloseHandle(file);
if(map == INVALID_HANDLE_VALUE) {
trace("Could not create file mapping: %u\n", GetLastError());
@@ -2147,10 +2149,12 @@
CHECK_CALLED(global_propargput_i);
SET_EXPECT(global_testargtypes_i);
- parse_script_a("testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp,
function(d,i,s) {"
+ parse_script_a("testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp,
function(nullunk,d,i,s) {"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' +
getVT(i));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' +
getVT(s));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = '
+ getVT(d));"
+ " ok(getVT(nullunk) === 'VT_DISPATCH',
'getVT(nullunk) = ' + getVT(nullunk));"
+ " ok(nullunk === null, 'nullunk !== null');"
"});");
CHECK_CALLED(global_testargtypes_i);