[PATCH 1/3] mshtml/tests: Add tests showing how toString has changed in IE9+.
Jeff Smith
whydoubt at gmail.com
Mon Mar 16 23:36:36 CDT 2020
Signed-off-by: Jeff Smith <whydoubt at 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
];
--
2.23.0
More information about the wine-devel
mailing list