| <!DOCTYPE html> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <a href="javascript:">foo<img ismap style="content:'bar'; display:block;"></a> |
| <script> |
| let t = async_test('This test passes if no crash'); |
| setup({allow_uncaught_exception: true}); |
| window.onload = t.step_func(function() { |
| document.getElementsByTagName('img')[0].click(); |
| }); |
| window.onerror = t.step_func_done(function(message) { |
| //This error is because of "javascript:" url is not expected in case of ismap |
| //This can not be caught in try-catch block as the click() execution could |
| //finish before Syntax error was thrown from '<a href="javascript:">' |
| assert_equals(message, 'Uncaught SyntaxError: Unexpected token \'?\''); |
| }); |
| </script> |