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

Side by Side Diff: LayoutTests/fast/regions/cssom/get-regions-by-content.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 body { font-family: monospace; }
8 #article { -webkit-flow-into: flow; }
9 .border { border: 1px solid red; }
10 #region { -webkit-flow-from: flow; width: 250px; height: 50px; posit ion: absolute; left: 10px; top: 200px; }
11
12 #article2 { -webkit-flow-into: flow2; }
13 #region21 { -webkit-flow-from: flow2; width: 250px; height: 50px; po sition: absolute; left: 20px; top: 300px;}
14 #region22 { -webkit-flow-from: flow2; width: 250px; height: 50px; po sition: absolute; left: 20px; top: 350px;}
15 </style>
16 </head>
17 <body>
18 <div id="article">
19 <p id="p1">Text flown into region.</p>
20 </div>
21 <div id="region" class="border"></div>
22
23 <div id="article2">
24 <p id="p2">Text flown in two regions. Text flown in two regions. Tex t flown in two regions.</p>
25 </div>
26 <div id="region21" class="border"></div>
27 <div id="region22" class="border"></div>
28 <script>
29 if (window.testRunner)
30 testRunner.dumpAsText();
31
32 description("Test for 90759: [CSSRegions] Rename NamedFlow::getRegio nsByContentNode to NamedFlow::getRegionsByContent.");
33
34 var namedFlow = getFlowByName("flow");
35 var targetNode = document.getElementById("p1");
36 var regionList = namedFlow.getRegionsByContent(targetNode);
37
38 shouldEvaluateTo("regionList.length", 1);
39 shouldBeEqualToString("regionList.item(0).id", "region");
40
41 namedFlow = getFlowByName("flow2");
42 // Test that the p2 element is flown into 2 regions
43 targetNode = document.getElementById("p2");
44 regionList = namedFlow.getRegionsByContent(targetNode);
45
46 shouldEvaluateTo("regionList.length", 2);
47 shouldBeEqualToString("regionList.item(0).id", "region21");
48 shouldBeEqualToString("regionList.item(1).id", "region22");
49
50 // Test that p1 element is not in flow2
51 targetNode = document.getElementById("p1");
52 regionList = namedFlow.getRegionsByContent(targetNode);
53 shouldEvaluateTo("regionList.length", 0);
54
55 function hideRegionsAndFlows() {
56 document.getElementById("article").style.visibility = "hidden";
57 document.getElementById("article2").style.visibility = "hidden";
58 document.getElementById("region").style.visibility = "hidden";
59 document.getElementById("region21").style.visibility = "hidden";
60 document.getElementById("region22").style.visibility = "hidden";
61 }
62
63 hideRegionsAndFlows();
64 </script>
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698