diff -r 000000000000 -r 6474c204b198 browser/base/content/test/newtab/browser_newtab_bug991111.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/base/content/test/newtab/browser_newtab_bug991111.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,19 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +function runTests() { + yield setLinks("0"); + yield addNewTabPageTab(); + + // Remember if the click handler was triggered + let cell = getCell(0); + let clicked = false; + cell.site.onClick = e => { + clicked = true; + executeSoon(TestRunner.next); + }; + + // Send a middle-click and make sure it happened + yield EventUtils.synthesizeMouseAtCenter(cell.node, {button: 1}, getContentWindow()); + ok(clicked, "middle click triggered click listener"); +}