4 <script src=
"../../resources/js-test.js"></script>
8 description("Checks that an exception is thrown when a dictionary value cannot be converted to a String");
9 shouldBeEqualToString("new MessageEvent('message', {origin: 'test'}).origin", "test");
10 shouldBeEqualToString("new MessageEvent('message', {origin: 2}).origin", "2");
11 var nonConvertibleToString
= {toString: function() { throw "Exception in toString()"; }};
12 shouldThrow("new MessageEvent('message', {origin: nonConvertibleToString})", "'Exception in toString()'");