mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 00:40:31 +00:00
[JSCRIPT_WINETEST]
* Sync with Wine 1.7.17. CORE-8080 svn path=/trunk/; revision=62900
This commit is contained in:
parent
31907202aa
commit
2fcd9693a8
4 changed files with 37 additions and 26 deletions
|
@ -124,18 +124,6 @@ const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY =
|
|||
|
||||
#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 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
|
|||
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 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
|
|||
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 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
|
|||
|
||||
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 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface,
|
|||
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 @@ static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
|
|||
DWORD res;
|
||||
|
||||
if(!init) {
|
||||
RegDeleteKey(HKEY_CLASSES_ROOT, key_name);
|
||||
RegDeleteKeyA(HKEY_CLASSES_ROOT, key_name);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1163,11 +1151,12 @@ START_TEST(activex)
|
|||
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");
|
||||
}
|
||||
|
|
|
@ -2357,6 +2357,13 @@ testSyntaxError("ok(false, 'unexpected execution'); while(true) continue some_la
|
|||
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");
|
||||
|
|
|
@ -38,6 +38,17 @@ ok(1000000*1000000 === 1000000000000, "1000000*1000000 === 1000000000000 is fals
|
|||
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");
|
||||
|
||||
|
|
|
@ -1163,7 +1163,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
|
|||
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 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
|
|||
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 @@ static BSTR get_script_from_file(const char *filename)
|
|||
|
||||
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 @@ static BOOL run_tests(void)
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue