bug686396.js (472B)
1 (function () { 2 assertEquals = function assertEquals(expected, found, name_opt) { }; 3 })(); 4 function testOne(receiver, key, result) { 5 for(var i = 0; i != 10; i++ ) { 6 assertEquals(result, receiver[key]()); 7 } 8 } 9 function TypeOfThis() { return typeof this; } 10 Number.prototype.type = TypeOfThis; 11 String.prototype.type = TypeOfThis; 12 Boolean.prototype.type = TypeOfThis; 13 testOne(2.3, 'type', 'object'); 14 testOne('x', 'type', 'object'); 15 testOne(true, 'type', 'object');