| <script src="../../resources/js-test-pre.js"></script> |
| <img src="resources/annotation.pdf"> |
| description("Test the cached ImageBuffer of a PDF docoument image won't be thrown away if the image moves."); |
| function moveImageLoop(image, stepDistance, stepCount) { |
| image.style.left = step * stepDistance + 'px'; |
| if (++step < stepCount) { |
| requestAnimationFrame(loop); |
| shouldBe("internals.pdfDocumentCachingCount(window.image)", "1"); |
| moveImageLoop(document.querySelector("img"), 50, 10); |
| <script src="../../resources/js-test-post.js"></script> |