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

Unified Diff: third_party/WebKit/LayoutTests/web-animations-api/animation-cancel-in-raf.html

Issue 2527043002: Blink Animation: Request serviceOnNextFrame on animation's finish and cancel. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/animation-finish-in-raf.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/web-animations-api/animation-cancel-in-raf.html
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/animation-cancel-in-raf.html b/third_party/WebKit/LayoutTests/web-animations-api/animation-cancel-in-raf.html
new file mode 100644
index 0000000000000000000000000000000000000000..3c8992e97773c672aafdb80781edfca1bd5b22ed
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/web-animations-api/animation-cancel-in-raf.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Canceling an animation inside requestAnimationFrame</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<body>
+<script>
+async_test(t => {
+ var anim = document.body.animate([], 1000);
+
+ anim.addEventListener('cancel', () => {
+ t.done();
+ });
+
+ requestAnimationFrame(() => {
+ anim.cancel();
+ });
+}, 'Animation cancel event happens if animation cancelled in raf');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/animation-finish-in-raf.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698