browser/base/content/test/newtab/browser_newtab_bug991111.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/newtab/browser_newtab_bug991111.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +function runTests() {
     1.8 +  yield setLinks("0");
     1.9 +  yield addNewTabPageTab();
    1.10 +
    1.11 +  // Remember if the click handler was triggered
    1.12 +  let cell = getCell(0);
    1.13 +  let clicked = false;
    1.14 +  cell.site.onClick = e => {
    1.15 +    clicked = true;
    1.16 +    executeSoon(TestRunner.next);
    1.17 +  };
    1.18 +
    1.19 +  // Send a middle-click and make sure it happened
    1.20 +  yield EventUtils.synthesizeMouseAtCenter(cell.node, {button: 1}, getContentWindow());
    1.21 +  ok(clicked, "middle click triggered click listener");
    1.22 +}

mercurial