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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/w3c/keyframe-properties.html

Issue 2910883002: Clean up duplicate tests in web-animations-api (Closed)
Patch Set: Rebase and remove one more reference to deleted test Created 3 years, 6 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 <meta charset='utf-8'>
3 <title>Web Animations API: Keyframe Property tests</title>
4 <link rel='help' href='https://w3c.github.io/web-animations/#processing-a-keyfra mes-argument'>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <div id="div"></div>
8 <script>
9
10 test(function() {
11 var keyframe = {};
12 Object.defineProperty(keyframe, 'width', {value: '200px'});
13 Object.defineProperty(keyframe, 'height', {
14 value: '100px',
15 enumerable: true});
16 assert_equals(keyframe.width, '200px', 'width of keyframe is readable');
17 assert_equals(keyframe.height, '100px', 'height of keyframe is readable');
18 try {
19 div.animate([keyframe, {height: '200px'}], 1);
20 } catch (e) {
21 assert_unreached("Mismatched properties - both or neither properties on keyf rame were considered.");
22 }
23 }, 'Only enumerable properties on keyframes are considered');
24
25 test(function() {
26 var KeyframeParent = function() { this.width = "100px"; };
27 KeyframeParent.prototype = { height: "100px" };
28 var Keyframe = function() { this.top = "100px"; };
29 Keyframe.prototype = Object.create(KeyframeParent.prototype);
30 Object.defineProperty(Keyframe.prototype, "left", {
31 value: '100px',
32 enumerable: 'true'});
33 var keyframe = new Keyframe();
34 try {
35 div.animate([keyframe, {top: '200px'}], 1);
36 } catch (e) {
37 assert_unreached("Mismatched properties - left, width or height considered o n first keyframe.");
38 }
39 }, 'Only properties defined directly on keyframes are considered');
40
41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698