blob: 7ddd9411e9b82908efb067e4765a222d8becfc25 [file] [log] [blame]
<script src="../../../resources/js-test.js"></script>
<script>
description("Tests that assigning a bad string to HTMLFrameElement.location throws and aborts properly.");
var frameLocation = parent.frames[1].location;
shouldNotBe("frameLocation", "null");
shouldNotBe("frameLocation", "undefined");
var badString = { toString: function() { throw "Exception in toString()"; } };
shouldThrow("parent.frames[1].location = badString;", "'Exception in toString()'");
shouldBe("parent.frames[1].location", "frameLocation");
</script>