mshtml/tests: Add tests showing how toString has changed in IE9+.
Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b2d1d1694d
commit
79cde059ea
|
@ -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"; } };
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue