async function runTests() { var i = document.getElementById("i");
doc = i.contentDocument; var win = i.contentWindow;
// set display none on b
doc.getElementById("b").style.display = "none";
// flush layout
doc.documentElement.offsetLeft;
// focus on the iframe
win.focus();
// clear out any potential scroll events so we can listen for the one we want without false positives
await waitToClearOutAnyPotentialScrolls(window);
step2();
}
function step2() { var i = document.getElementById("i");
doc = i.contentDocument; var win = i.contentWindow;
// record scrolltop
scrollTopBefore = doc.body.scrollTop;
// send up arrow key event
sendKey("UP");
function finish() {
// assert that scroll top is now less than before
ok(scrollTopBefore > doc.body.scrollTop, "pressing up arrow should scroll up");
SimpleTest.finish();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.