Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html

Issue 2262493003: Prevent synchronous layout while painting the last frame of a gif (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « third_party/WebKit/LayoutTests/SlowTests ('k') | third_party/WebKit/LayoutTests/paint/images/resources/three_frame_100ms.gif » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698