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

Side by Side Diff: LayoutTests/fast/multicol/cssom-view.html

Issue 256743006: [New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 7 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/multicol/cssom-view-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6 if (window.internals)
7 internals.settings.setRegionBasedColumnsEnabled(true);
8 </script>
9 <body style="margin-left:10px; margin-top:15px;">
10 <div style="-webkit-columns:3; columns:3;" id="mc">
11 <div id="elm1" class="rodent">elm1</div>
12 <br>
13 <div>
14 <div id="elm2" class="rodent">elm2</div>
15 <div id="elm3" class="rodent">elm3</div>
16 </div>
17 <div id="elm4" class="rodent">elm4</div>
18 <div id="elm5" class="rodent">elm5</div>
19 </div>
20 <p id="console"></p>
21 <script>
22 var mc = document.getElementById('mc');
23 var elm1 = document.getElementById('elm1');
24 var elm2 = document.getElementById('elm2');
25 var elm3 = document.getElementById('elm3');
26 var elm4 = document.getElementById('elm4');
27 var elm5 = document.getElementById('elm5');
28 shouldBe("mc.offsetLeft", "10");
29 shouldBe("mc.offsetTop", "15");
30
31 shouldBe("elm1.offsetLeft", "mc.offsetLeft");
32 shouldBe("elm1.offsetTop", "mc.offsetTop");
33 shouldBeGreaterThan("elm2.offsetLeft", "elm1.offsetLeft");
34 shouldBe("elm2.offsetTop", "elm1.offsetTop");
35 shouldBe("elm3.offsetLeft", "elm2.offsetLeft");
36 shouldBeGreaterThan("elm3.offsetTop", "elm2.offsetTop");
37 shouldBeGreaterThan("elm4.offsetLeft", "elm3.offsetLeft");
38 shouldBe("elm4.offsetTop", "elm1.offsetTop");
39 shouldBe("elm5.offsetLeft", "elm4.offsetLeft");
40 shouldBe("elm5.offsetTop", "elm3.offsetTop");
41
42 var elements = document.getElementsByClassName('rodent');
43 for (var i = 0; i < elements.length; i++) {
44 var rects = elements[i].getClientRects();
45 shouldBe("rects.length", "1");
46 shouldBe("rects[0].left", "elements[i].offsetLeft");
47 shouldBe("rects[0].top", "elements[i].offsetTop");
48 }
49 </script>
50 </body>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/multicol/cssom-view-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698