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

Side by Side Diff: LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/values/shape-margin-005.html

Issue 816533002: Import CSSWG Shapes tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more test expectations update Created 6 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Shape Margin - inherit</title>
5 <link rel="author" title="Adobe" href="http://html.adobe.com/">
6 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com">
7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-p roperty">
8 <meta name="assert" content="The shape-margin value is not inherited and can be assigned the 'inherit' value.">
9 <meta name="flags" content="dom">
10 <script src="../../../../../resources/testharness.js"></script>
11 <script src="../../../../../resources/testharnessreport.js"></script>
12 <script src="support/parsing-utils.js"></script>
13 </head>
14 <body>
15 <div id="log"></div>
16 <script type="text/javascript">
17
18 function setUpTest(parentValue, childValue) {
19 var outer = document.createElement("div");
20 var inner = document.createElement("div");
21 outer.appendChild(inner);
22
23 outer.style.setProperty("shape-outside", "content-box");
24 outer.style.setProperty("shape-margin", parentValue);
25 inner.style.setProperty("shape-outside", "circle()");
26 inner.style.setProperty("shape-margin", childValue);
27
28 document.body.appendChild(outer);
29
30 var inline = inner.style.getPropertyValue("shape-margin");
31 var style = getComputedStyle(inner);
32 var computed = style.getPropertyValue("shape-margin");
33 document.body.removeChild(outer);
34
35 return [inline, computed];
36 }
37
38 test(function() {
39 var results = setUpTest("10px", "inherit");
40 assert_equals(results[0], "inherit");
41 assert_equals(results[1], "10px");
42 }, "shape-margin can be assigned 'inherit' value");
43
44 test(function() {
45 var results = setUpTest("5px", null);
46 assert_equals(results[0], null);
47 assert_equals(results[1], "0px");
48 }, "shape-margin is not inherited and defaults to 0px");
49
50 test(function() {
51 var results = setUpTest("15px", "10px");
52 assert_equals(results[0], "10px");
53 assert_equals(results[1], "10px");
54 }, "shape-margin is not inherited");
55
56 </script>
57 </body>
58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698