blob: be1c75b4c32c29f33a3b032e48192eb5472c780a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.internals)
internals.settings.setRequestAnimationFrameEnabled(false);
</script>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests that requestAnimationFrame is disabled when the setting/preference is false. Note: since the setting is true by default, this usually can't be tested directly in a browser.");
var callbackInvoked = false;
window.requestAnimationFrame(function() {
callbackInvoked = true;
});
if (window.testRunner)
testRunner.displayAndTrackRepaints();
setTimeout(function() {
shouldBeFalse("callbackInvoked");
}, 100);
if (window.testRunner)
testRunner.waitUntilDone();
setTimeout(function() {
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}, 200);
</script>
</body>
</html>