diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/for-of/next-2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/for-of/next-2.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,8 @@ +// Iterator.prototype.next throws if applied to a non-iterator that inherits from an iterator. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var it = [1, 2][std_iterator](); +var v = Object.create(it); +assertThrowsInstanceOf(function () { Iterator.prototype.next.call(v); }, TypeError);