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

Unified Diff: third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html

Issue 1851003002: Throw TypeError if easing string is invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix "liner"->"linear" typo in ui/file_manager js file Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/function-easing-use-counters-other1.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html
diff --git a/third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html b/third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html
index 769a70c0e28a832618d5067c988ca8cd4d7bad14..29c56676abdc98d02a9bf4a56d1fc88714da2e3d 100644
--- a/third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html
+++ b/third_party/WebKit/LayoutTests/animations/function-easing-use-counters-linear.html
@@ -11,12 +11,19 @@ test(() => {
document.documentElement.animate([], { });
document.documentElement.animate([], { easing: 'linear' });
document.documentElement.animate([], { easing: 'step-start' });
- document.documentElement.animate([], { easing: 'invalid' });
assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionLinear));
assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionOther));
}, 'Non-function values for easing are not use-counted.');
test(() => {
+ assert_throws(
+ {name: 'TypeError'},
+ function() { document.documentElement.animate([], { easing: 'invalid' }) });
+ assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionLinear));
+ assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionOther));
+}, 'Invalid non-function values for easing are not use-counted.');
+
+test(() => {
// This linear function value is the one expected from uses of the unpatched
// Web Animations polyfill (i.e. old versions lacking
// https://github.com/web-animations/web-animations-next/pull/423).
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/function-easing-use-counters-other1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698