| <!DOCTYPE html> |
| <script src="../../resources/js-test-pre.js"></script> |
| <a href='about:blank' target='_blank'></a> |
| <script> |
| description('Check that a javascript generated mouse click is not enough to open a new tab.'); |
| if (window.testRunner) { |
| testRunner.setCanOpenWindows(); |
| testRunner.setPopupBlockingEnabled(true); |
| } |
| |
| var evt = document.createEvent('MouseEvents'); |
| evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, null); |
| document.querySelector('a').dispatchEvent(evt); |
| |
| if (window.testRunner) |
| shouldBe("testRunner.windowCount()", "1"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |