Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/jscript/tests/api.js | 6 ++++++ dlls/mshtml/tests/es5.js | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+)
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 1a81253a02..d4aa7f4383 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -351,6 +351,12 @@ tmp = Object.prototype.toString.call(new VBArray(createArray())); ok(tmp === "[object Object]", "toString.call(new VBArray()) = " + tmp); (tmp = new Enumerator()).f = Object.prototype.toString; ok(tmp.f() === "[object Object]", "tmp.f() = " + tmp.f()); +tmp = Object.prototype.toString.call(null); +ok(tmp === "[object Object]", "toString.call(null) = " + tmp); +tmp = Object.prototype.toString.call(undefined); +ok(tmp === "[object Object]", "toString.call(undefined) = " + tmp); +tmp = Object.prototype.toString.call(); +ok(tmp === "[object Object]", "toString.call() = " + tmp);
function TSTestConstr() {} TSTestConstr.prototype = { toString: function() { return "test"; } }; diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 7ee8cc1e03..7a5b9d57ea 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -767,6 +767,28 @@ function test_getPrototypeOf() { next_test(); }
+function test_toString() { + var tmp; + + (function () { tmp = Object.prototype.toString.call(arguments); })(); + todo_wine. + ok(tmp === "[object Arguments]", "toString.call(arguments) = " + tmp); + tmp = Object.prototype.toString.call(this); + todo_wine. + ok(tmp === "[object Window]", "toString.call(null) = " + tmp); + tmp = Object.prototype.toString.call(null); + todo_wine. + ok(tmp === "[object Null]", "toString.call(null) = " + tmp); + tmp = Object.prototype.toString.call(undefined); + todo_wine. + ok(tmp === "[object Undefined]", "toString.call(undefined) = " + tmp); + tmp = Object.prototype.toString.call(); + todo_wine. + ok(tmp === "[object Undefined]", "toString.call() = " + tmp); + + next_test(); +} + function test_bind() { var f, r; var o = new Object(), o2 = new Object(); @@ -860,5 +882,6 @@ var tests = [ test_global_properties, test_string_split, test_getPrototypeOf, + test_toString, test_bind ];
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48762 Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/jscript/object.c | 2 +- dlls/mshtml/tests/es5.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 3cac277775..268cfaa1c3 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -612,7 +612,7 @@ static HRESULT Object_create(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, return E_INVALIDARG; }
- hres = create_dispex(ctx, NULL, proto, &obj); + hres = create_dispex(ctx, &ObjectInst_info, proto, &obj); if(FAILED(hres)) return hres;
diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 7a5b9d57ea..6b5d04a959 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -768,7 +768,7 @@ function test_getPrototypeOf() { }
function test_toString() { - var tmp; + var tmp, obj;
(function () { tmp = Object.prototype.toString.call(arguments); })(); todo_wine. @@ -786,6 +786,13 @@ function test_toString() { todo_wine. ok(tmp === "[object Undefined]", "toString.call() = " + tmp);
+ obj = Object.create(null); + tmp = Object.prototype.toString.call(obj); + ok(tmp === "[object Object]", "toString.call(Object.create(null)) = " + tmp); + obj = Object.create(Number.prototype); + tmp = Object.prototype.toString.call(obj); + ok(tmp === "[object Object]", "toString.call(Object.create(Number.prototype)) = " + tmp); + next_test(); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=67297
Your paranoid android.
=== w1064v1809_ja (32 bit report) ===
mshtml: events.c:1073: Test failed: unexpected call img_onload
=== w1064v1809_ja (testbot log) ===
The task timed out
=== debiant (32 bit report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit French report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit Japanese:Japan report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit Chinese:China report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (64 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/jscript/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 268cfaa1c3..bfc1a892df 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -81,7 +81,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u str = names[jsdisp->builtin_info->class]; }else { assert(jsdisp->builtin_info->class != JSCLASS_NONE); - FIXME("jdisp->builtin_info->class = %d\n", jsdisp->builtin_info->class); + FIXME("jsdisp->builtin_info->class = %d\n", jsdisp->builtin_info->class); return E_FAIL; }
Signed-off-by: Jacek Caban jacek@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=67296
Your paranoid android.
=== debiant (32 bit report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit French report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit Japanese:Japan report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit Chinese:China report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (32 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debiant (64 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005