Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | load(libdir + "asserts.js"); |
michael@0 | 2 | load(libdir + "iteration.js"); |
michael@0 | 3 | |
michael@0 | 4 | assertThrowsInstanceOf(() => Math.sin(...true), TypeError); |
michael@0 | 5 | assertThrowsInstanceOf(() => Math.sin(...false), TypeError); |
michael@0 | 6 | assertThrowsInstanceOf(() => Math.sin(...new Date()), TypeError); |
michael@0 | 7 | assertThrowsInstanceOf(() => Math.sin(...Function("")), TypeError); |
michael@0 | 8 | assertThrowsInstanceOf(() => Math.sin(...function () {}), TypeError); |
michael@0 | 9 | assertThrowsInstanceOf(() => Math.sin(...(x => x)), TypeError); |
michael@0 | 10 | assertThrowsInstanceOf(() => Math.sin(...1), TypeError); |
michael@0 | 11 | assertThrowsInstanceOf(() => Math.sin(...{}), TypeError); |
michael@0 | 12 | var foo = {} |
michael@0 | 13 | |
michael@0 | 14 | foo[std_iterator] = 10; |
michael@0 | 15 | assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); |
michael@0 | 16 | |
michael@0 | 17 | foo[std_iterator] = function() undefined; |
michael@0 | 18 | assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); |
michael@0 | 19 | |
michael@0 | 20 | foo[std_iterator] = function() this; |
michael@0 | 21 | assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); |
michael@0 | 22 | |
michael@0 | 23 | foo[std_iterator] = function() this; |
michael@0 | 24 | foo.next = function() { throw 10; }; |
michael@0 | 25 | assertThrowsValue(() => Math.sin(...foo), 10); |
michael@0 | 26 | |
michael@0 | 27 | assertThrowsInstanceOf(() => Math.sin(.../a/), TypeError); |
michael@0 | 28 | assertThrowsInstanceOf(() => Math.sin(...new Error()), TypeError); |