Commit 36fe9472 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added ScriptEngine() implementation.

parent bfc8832c
...@@ -706,8 +706,22 @@ static HRESULT JSGlobal_GetObject(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags ...@@ -706,8 +706,22 @@ static HRESULT JSGlobal_GetObject(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
static HRESULT JSGlobal_ScriptEngine(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, static HRESULT JSGlobal_ScriptEngine(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{ {
FIXME("\n"); static const WCHAR JScriptW[] = {'J','S','c','r','i','p','t',0};
return E_NOTIMPL;
TRACE("\n");
if(retv) {
BSTR ret;
ret = SysAllocString(JScriptW);
if(!ret)
return E_OUTOFMEMORY;
V_VT(retv) = VT_BSTR;
V_BSTR(retv) = ret;
}
return S_OK;
} }
static HRESULT JSGlobal_ScriptEngineMajorVersion(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, static HRESULT JSGlobal_ScriptEngineMajorVersion(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
var tmp, i; var tmp, i;
ok(ScriptEngine() === "JScript", "ScriptEngine() = " + ScriptEngine());
ok(ScriptEngine(3) === "JScript", "ScriptEngine(3) = " + ScriptEngine(3));
i = parseInt("0"); i = parseInt("0");
ok(i === 0, "parseInt('0') = " + i); ok(i === 0, "parseInt('0') = " + i);
i = parseInt("123"); i = parseInt("123");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment