Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / resources / frame-set-location-badstring.html
blob7ddd9411e9b82908efb067e4765a222d8becfc25
1 <script src="../../../resources/js-test.js"></script>
2 <script>
3 description("Tests that assigning a bad string to HTMLFrameElement.location throws and aborts properly.");
5 var frameLocation = parent.frames[1].location;
6 shouldNotBe("frameLocation", "null");
7 shouldNotBe("frameLocation", "undefined");
8 var badString = { toString: function() { throw "Exception in toString()"; } };
9 shouldThrow("parent.frames[1].location = badString;", "'Exception in toString()'");
10 shouldBe("parent.frames[1].location", "frameLocation");
11 </script>