| Index: third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html
|
| diff --git a/third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html b/third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..61755e56fd76a70e58b1cd36010080cf082ee68b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html
|
| @@ -0,0 +1,23 @@
|
| +<!DOCTYPE HTML>
|
| +<title>Skipping up to the last frame of an animated gif shouldn't crash.</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<img id="image" src="resources/three_frame_100ms.gif">
|
| +<script>
|
| +async_test(function(test) {
|
| + image.onload = function() {
|
| + setTimeout(function() {
|
| + var start = performance.now();
|
| + while (true) {
|
| + // Block the main thread for 300ms.
|
| + if (performance.now() - start >= 300)
|
| + break;
|
| + }
|
| + // Painting will force the gif to advance to the last frame.
|
| + requestAnimationFrame(function() {
|
| + test.done();
|
| + });
|
| + }, 30);
|
| + }
|
| +});
|
| +</script>
|
|
|