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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/motion-path/offset-distance.html

Issue 2241993002: CSS Motion Path: New names for properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 3 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 <html>
3 <head>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <style>
7 #div2 {
8 offset-distance: 0;
9 }
10 #div3 {
11 offset-distance: 100px;
12 }
13 #div4 {
14 offset-distance: -200px;
15 }
16 #div5 {
17 offset-distance: 50%;
18 }
19 #div6 {
20 offset-distance: inherit;
21 }
22 </style>
23 </head>
24 <body>
25 <div id="div1"></div>
26 <div id="div2"></div>
27 <div id="div3"></div>
28 <div id="div4"></div>
29 <div id="div5">
30 <div id="div6"></div>
31 <div id="div7"></div>
32 </div>
33 <span id="span1" style="offset-distance: 25%"></span>
34 <script>
35 "use strict";
36
37 test(function() {
38 assert_equals(getComputedStyle(div1, null).offsetDistance, '0px');
39 }, 'offset-distance default is 0px');
40
41 test(function() {
42 assert_equals(getComputedStyle(div2, null).offsetDistance, '0px');
43 }, 'offset-distance 0 is 0px');
44
45 test(function() {
46 assert_equals(getComputedStyle(div3, null).offsetDistance, '100px');
47 }, 'offset-distance can be positive');
48
49 test(function() {
50 assert_equals(getComputedStyle(div4, null).offsetDistance, '-200px');
51 }, 'offset-distance allows negative values');
52
53 test(function() {
54 assert_equals(getComputedStyle(div5, null).offsetDistance, '50%');
55 }, 'offset-distance can be a percentage');
56
57 test(function() {
58 assert_equals(getComputedStyle(div6, null).offsetDistance, '50%');
59 }, 'offset-distance can be explicitly inherited');
60
61 test(function() {
62 assert_equals(getComputedStyle(div7, null).offsetDistance, '0px');
63 }, 'offset-distance is not inherited by default');
64
65 test(function() {
66 assert_equals(span1.style.offsetDistance, '25%');
67 }, 'offset-distance style can be set inline');
68
69 </script>
70 </body>
71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698