| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| |
| description("Tests what happens when you make prototype chain accesses with impure GetOwnPropertySlot traps in the way."); |
| |
| var img = new Image(); |
| img.name = "getElementsByTagName"; |
| document.body.appendChild(img); |
| |
| function f() { |
| return document.getElementsByTagName; |
| } |
| |
| var expected = "\"object\""; |
| for (var i = 0; i < 40; ++i) { |
| if (i == 35) { |
| document.body.removeChild(img); |
| expected = "\"function\""; |
| } |
| shouldBe("typeof f()", expected); |
| } |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |