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

Side by Side Diff: LayoutTests/fast/regions/cssom/get-regions-by-content-pseudo.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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/helper.js"></script>
6 <style>
7 #article {
8 -webkit-flow-into: article;
9 height: 150px;
10 width: 50px;
11 background-color: green;
12 }
13
14 #region_1 {
15 position: absolute;
16 top:200px;
17 left: 100px;
18 }
19
20 #region_1::before {
21 display: block;
22 width: 50px;
23 height: 50px;
24 border: 1px solid black;
25 -webkit-flow-from: article;
26 }
27
28 #region_1::after {
29 display: block;
30 width: 50px;
31 height: 50px;
32 border: 1px solid black;
33 -webkit-flow-from: article;
34 }
35
36 #region_2 {
37 -webkit-flow-from: article;
38 height:50px;
39 width:50px;
40 position: absolute;
41 top: 200px;
42 left: 200px;
43 border: 1px solid black;
44 }
45 </style>
46 </head>
47 <body>
48 <!--
49 Test that the pseudo-elements regions are not exposed to JS.
50 -->
51 <div id="article"></div>
52
53 <div id="region_1"></div>
54 <div id="region_2"></div>
55 <script>
56 if (window.testRunner)
57 testRunner.dumpAsText();
58 description("Tests WebKitNamedFlow.getRegionsByContent() and pseudo- elements as regions")
59
60 var namedFlow = getFlowByName("article");
61 var targetNode = document.getElementById("article");
62 var regionList = namedFlow.getRegionsByContent(targetNode);
63
64 shouldEvaluateTo("regionList.length", 1);
65 shouldBeEqualToString("regionList.item(0).id", "region_2");
66
67 document.getElementById("article").style.visibility = "hidden";
68 document.getElementById("region_1").style.visibility = "hidden";
69 document.getElementById("region_2").style.visibility = "hidden";
70 </script>
71 </body>
72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698