Commit 79cde059 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

mshtml/tests: Add tests showing how toString has changed in IE9+.

parent b2d1d169
......@@ -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
];
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