michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function runTests() { michael@0: yield setLinks("0"); michael@0: yield addNewTabPageTab(); michael@0: michael@0: // Remember if the click handler was triggered michael@0: let cell = getCell(0); michael@0: let clicked = false; michael@0: cell.site.onClick = e => { michael@0: clicked = true; michael@0: executeSoon(TestRunner.next); michael@0: }; michael@0: michael@0: // Send a middle-click and make sure it happened michael@0: yield EventUtils.synthesizeMouseAtCenter(cell.node, {button: 1}, getContentWindow()); michael@0: ok(clicked, "middle click triggered click listener"); michael@0: }