BackwardsGraph needs to consider back edges as the backward's root successor
[WebKit-https.git] / JSTests / es6 / String.prototype_methods_String_iterator_prototype_chain.js
1 function test() {
2
3 // Iterator instance
4 var iterator = ''[Symbol.iterator]();
5 // %StringIteratorPrototype%
6 var proto1 = Object.getPrototypeOf(iterator);
7 // %IteratorPrototype%
8 var proto2 = Object.getPrototypeOf(proto1);
9
10 return proto2.hasOwnProperty(Symbol.iterator) &&
11   !proto1    .hasOwnProperty(Symbol.iterator) &&
12   !iterator  .hasOwnProperty(Symbol.iterator) &&
13   iterator[Symbol.iterator]() === iterator;
14       
15 }
16
17 if (!test())
18     throw new Error("Test failed");
19