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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/reject-hyphen.html

Issue 1771733002: Web Animations: Use of hyphens is no longer supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: warn if hyphenated property is present Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <style>
5
6 div { font-size: 10px; }
7
8 </style>
9 <div id='element'></div>
10 <script>
11
12 var element = document.getElementById('element');
13
14 function animate(property, value) {
15 var keyframes = [
16 {offset: 0},
17 {offset: 1},
18 ];
19 keyframes[0][property] = value;
20 keyframes[1][property] = value;
21
22 try { element.animate(keyframes, {fill: 'forwards'}); } catch(e) {}
23 }
alancutter (OOO until 2018) 2016/03/10 01:26:50 Why is there a try catch? This helper function is
Eric Willigers 2016/03/10 01:56:04 Fixed.
24
25 test(function() {
26 animate('font-size', '20px');
27 assert_equals(getComputedStyle(element).fontSize, '10px');
28
29 animate('fontSize', '30px');
30 assert_equals(getComputedStyle(element).fontSize, '30px');
31 }, 'Hyphenated propery names are rejected.');
alancutter (OOO until 2018) 2016/03/10 01:26:50 s/rejected/ignored/
Eric Willigers 2016/03/10 01:56:04 Done.
32
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698