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

Side by Side Diff: LayoutTests/fast/regions/cssom/element-region-overset-state-vertical-rl.html

Issue 159933010: Remove everything region-specific from LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <style>
5 html {-webkit-writing-mode: vertical-rl;}
6 body { font-family: monospace; }
7
8 #article {
9 -webkit-flow-into: article;
10 border: 2px solid black;
11 }
12
13 #region_1, #region_2, #region_3 {
14 -webkit-flow-from: no_article;
15 overflow:visible;
16 display:inline-block;
17 vertical-align:top;
18 margin:10px;
19 }
20
21 .block {
22 display:block;
23 }
24
25 #region_1 { height:110px; width:200px; border:1px solid #a0a0a0; }
26 #region_2 { height:110px; width:200px; border:1px solid black }
27 #region_3 { height:110px; width:200px; border:1px solid #a0a0a0; }
28
29 </style>
30 </head>
31 <body>
32 <div id="description" class="block"></div>
33 <div id="article">
34 <div>
35 <div id="content" style="width: 396px; background-color: green;"></div>
36 </div>
37 </div>
38
39 <div id="region_1"></div>
40 <div id="region_2"></div>
41 <div id="region_3"></div>
42
43 <div id="console" class="block"></div>
44
45 <script>
46 description("Tests Element.webkitRegionOverset attribute")
47 if (window.testRunner) {
48 testRunner.dumpAsText();
49 }
50 function regionOverset(id) {
51 var e = document.getElementById(id);
52 return e.webkitRegionOverset;
53 }
54 function flowContent(flowName) {
55 var r = document.getElementById("region_1");
56 r.style.webkitFlowFrom = flowName;
57 r = document.getElementById("region_2");
58 r.style.webkitFlowFrom = flowName;
59 r = document.getElementById("region_3");
60 r.style.webkitFlowFrom = flowName;
61 }
62 function addVisualOverflow() {
63 var c = document.getElementById("article");
64 c.style.webkitBoxShadow="-30px 0px lime";
65 }
66 function addMoreContent() {
67 var c = document.getElementById("content");
68 c.style.width = 596;
69 }
70
71 function test() {
72 shouldBeEqualToString("regionOverset('region_1')", "empty");
73 shouldBeEqualToString("regionOverset('region_2')", "empty");
74 shouldBeEqualToString("regionOverset('region_3')", "empty");
75
76 debug("Flow content");
77 flowContent("article");
78
79 shouldBeEqualToString("regionOverset('region_1')", "fit");
80 shouldBeEqualToString("regionOverset('region_2')", "fit");
81 shouldBeEqualToString("regionOverset('region_3')", "empty");
82
83 debug("Add more content");
84 addMoreContent();
85
86 shouldBeEqualToString("regionOverset('region_1')", "fit");
87 shouldBeEqualToString("regionOverset('region_2')", "fit");
88 shouldBeEqualToString("regionOverset('region_3')", "fit");
89
90 debug("Add visual overflow");
91 addVisualOverflow();
92
93 shouldBeEqualToString("regionOverset('region_1')", "fit");
94 shouldBeEqualToString("regionOverset('region_2')", "fit");
95 shouldBeEqualToString("regionOverset('region_3')", "overset");
96
97 debug("Empty content");
98 flowContent("no_article");
99
100 shouldBeEqualToString("regionOverset('region_1')", "empty");
101 shouldBeEqualToString("regionOverset('region_2')", "empty");
102 shouldBeEqualToString("regionOverset('region_3')", "empty");
103 }
104
105 test();
106 </script>
107 </body>
108 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698