<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<img id="img">
<script>
async_test(function(t) {
var img = document.getElementById("img");
var axImg = accessibilityController.accessibleElementById("img");
var count = 0;
axImg.addNotificationListener((notification) => {
if (notification == "MarkDirty") {
count++;
// We should only get at most one notification.
assert_equals(1, count);
}
});
img.src = "../images/resources/animated2.gif";
setTimeout(() => {
assert_equals(1, count);
t.done();
}, 300);
}, "When loading an animated image, a notification is only received once.");
</script>