blob: 0b458032aa69e7a59bf38ec895229516029f196e [file] [log] [blame]
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<script>
var hasScrolled = false;
function sawIteration(event) {
if (hasScrolled) {
document.getElementById("results").innerText = "PASS: Saw iteration after scrolling";
testRunner.notifyDone();
}
}
function startScroll() {
if (window.eventSender) {
eventSender.mouseMoveTo(200, 200);
eventSender.mouseDown();
eventSender.mouseMoveTo(200, 300);
setTimeout(endScroll, 100);
}
}
function endScroll() {
eventSender.mouseUp();
hasScrolled = true;
}
function startTest() {
var iframe = document.querySelector("iframe");
iframe.addEventListener("webkitAnimationIteration", sawIteration, false);
setTimeout(startScroll, 100);
}
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
window.addEventListener("load", startTest, false);
</script>
<iframe src="resources/anim.html"></iframe>
<div id="results"></div>