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

Side by Side Diff: LayoutTests/imported/csswg-test/css-shapes-1/spec-examples/shape-outside-003.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>CSS Test: Left and right float with shape-outside with clipped right float</title>
5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/>
6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#relation-to-box-mo del-and-float-behavior"/>
7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#supported-basic-sh apes"/>
8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-prop erty"/>
9 <link rel="match" href="reference/shape-outside-001-ref.html"/>
10 <meta name="flags" content="ahem"/>
11 <meta name="assert" content="This test verifies that left floats with a shap e-outside
12 only allow content wrapping on the right side, and right floats only allow wrapping on
13 the left and that the right float shape is clipped to the float’s margin bo x"/>
14 <!-- This test is derived from Example 2 in this version of the spec:
15 http://www.w3.org/TR/2013/WD-css-shapes-1-20131203/ -->
16 <style type="text/css">
17 body {
18 margin-left: 0;
19 }
20 .container {
21 width: 400px;
22 text-align: center;
23 font-family: Ahem;
24 font-size: 20px;
25 line-height: 1em;
26 }
27 #test {
28 color: green;
29 }
30 #test-float-left {
31 shape-outside: polygon(0 0, 200px 200px, 0 200px);
32 float: left;
33 width: 200px;
34 height: 200px;
35 }
36 #test-float-right {
37 shape-outside: polygon(200px 0, -800px 1000px, 200px 1000px);
38 float: right;
39 width: 200px;
40 height: 200px;
41 }
42 #failure-container {
43 color: red;
44 z-index: -1;
45 }
46 #test, #failure-container {
47 position: absolute;
48 top: 60px;
49 }
50 .line {
51 height: 20px;
52 }
53 #bottom {
54 position: absolute;
55 top: 200px;
56 }
57 #left-triangle, #right-triangle {
58 position: absolute;
59 top: 60px;
60 width: 200px;
61 height: 200px;
62 background-color: lightblue;
63 }
64 #left-triangle {
65 clip-path: polygon(0 0, 200px 200px, 0 200px);
66 }
67 #right-triangle {
68 left: 200px;
69 clip-path: polygon(200px 0, 200px 200px, 0 200px);
70 }
71 </style>
72 </head>
73 <body>
74 <p>
75 The test passes if the green shape does not intersect either of the tria ngles and
76 there is one green horizontal bar beneath the triangles. There should be no red.
77 </p>
78 <div id="test" class="container">
79 <div id="test-float-left"></div>
80 <div id="test-float-right"></div>
81 XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXX
82 XXXXXXXXXXX XXXXXXXXX XXXXXXX XXXXX XXX X
83 XXXXXXXXXXXXXXXXX
84 </div>
85 <div id="failure-container">
86 <div class="line container">XXXXXXXXXXXXXXXXX</div>
87 <div class="line container">XXXXXXXXXXXXXXX</div>
88 <div class="line container">XXXXXXXXXXXXX</div>
89 <div class="line container">XXXXXXXXXXX</div>
90 <div class="line container">XXXXXXXXX</div>
91 <div class="line container">XXXXXXX</div>
92 <div class="line container">XXXXX</div>
93 <div class="line container">XXX</div>
94 <div class="line container">X</div>
95 <div class="line container" id="bottom">XXXXXXXXXXXXXXXXX</div>
96 </div>
97 <div id="left-triangle"></div>
98 <div id="right-triangle"></div>
99 </body>
100 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698