jscript: Add Error_message implementation.
This commit is contained in:
parent
f33f5c9286
commit
f17b1f6334
|
@ -39,8 +39,19 @@ static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','
|
|||
static HRESULT Error_message(DispatchEx *dispex, LCID lcid, WORD flags,
|
||||
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
ErrorInstance *This = (ErrorInstance*)dispex;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
switch(flags) {
|
||||
case DISPATCH_PROPERTYGET:
|
||||
return VariantCopy(retv, &This->message);
|
||||
case DISPATCH_PROPERTYPUT:
|
||||
return VariantCopy(&This->message, get_arg(dp, 0));
|
||||
default:
|
||||
FIXME("unimplemented flags %x\n", flags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT Error_toString(DispatchEx *dispex, LCID lcid, WORD flags,
|
||||
|
|
|
@ -1252,9 +1252,14 @@ err = new Error();
|
|||
ok(err.valueOf === Object.prototype.valueOf, "err.valueOf !== Object.prototype.valueOf");
|
||||
ok(Error.prototype.name === "Error", "Error.prototype.name = " + Error.prototype.name);
|
||||
ok(err.name === "Error", "err.name = " + err.name);
|
||||
EvalError.prototype.message = "test";
|
||||
err = new EvalError();
|
||||
ok(EvalError.prototype.name === "EvalError", "EvalError.prototype.name = " + EvalError.prototype.name);
|
||||
ok(err.name === "EvalError", "err.name = " + err.name);
|
||||
ok(err.toString === Error.prototype.toString, "err.toString !== Error.prototype.toString");
|
||||
ok(err.message === "", "err.message != ''");
|
||||
err.message = date;
|
||||
ok(err.message === date, "err.message != date");
|
||||
err = new RangeError();
|
||||
ok(RangeError.prototype.name === "RangeError", "RangeError.prototype.name = " + RangeError.prototype.name);
|
||||
ok(err.name === "RangeError", "err.name = " + err.name);
|
||||
|
@ -1270,5 +1275,7 @@ ok(err.name === "TypeError", "err.name = " + err.name);
|
|||
err = new URIError();
|
||||
ok(URIError.prototype.name === "URIError", "URIError.prototype.name = " + URIError.prototype.name);
|
||||
ok(err.name === "URIError", "err.name = " + err.name);
|
||||
err = new Error("message");
|
||||
ok(err.message === "message", "err.message !== 'message'");
|
||||
|
||||
reportSuccess();
|
||||
|
|
Loading…
Reference in New Issue