2012-03-12 01:51:00 -07:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
|
|
|
function runTests() {
|
|
|
|
setLinks("0,1,2,3,4,5,6,7,8");
|
|
|
|
setPinnedLinks("");
|
|
|
|
|
|
|
|
yield addNewTabPageTab();
|
2012-03-15 15:28:22 -07:00
|
|
|
checkGrid("0,1,2,3,4,5,6,7,8");
|
2012-03-12 01:51:00 -07:00
|
|
|
|
|
|
|
let receivedError = false;
|
2012-03-27 03:02:55 -07:00
|
|
|
let block = getContentDocument().querySelector(".newtab-control-block");
|
2012-03-12 01:51:00 -07:00
|
|
|
|
|
|
|
function onError() {
|
|
|
|
receivedError = true;
|
|
|
|
}
|
|
|
|
|
2012-03-27 03:02:55 -07:00
|
|
|
let cw = getContentWindow();
|
2012-03-12 01:51:00 -07:00
|
|
|
cw.addEventListener("error", onError);
|
|
|
|
|
2012-03-15 15:28:22 -07:00
|
|
|
for (let i = 0; i < 3; i++)
|
2012-03-12 01:51:00 -07:00
|
|
|
EventUtils.synthesizeMouseAtCenter(block, {}, cw);
|
|
|
|
|
|
|
|
yield whenPagesUpdated();
|
|
|
|
ok(!receivedError, "we got here without any errors");
|
|
|
|
cw.removeEventListener("error", onError);
|
|
|
|
}
|