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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-over-constrained.html

Issue 2016913003: Revert of getComputedStyle should handle over-constrained properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <style>
3 #container {
4 width: 500px;
5 }
6 #container > div {
7 background-color: red;
8 position: relative;
9 left: 5px;
10 right: 5px;
11 top: 5px;
12 bottom: 5px;
13 }
14 </style>
15 <script src="../../../resources/js-test.js"></script>
16 <p>
17 getComputedStyle should handle over-constrained properties.
18 </p>
19 <div id="container">
20 <div id=ltr>
21 If direction of containing block is ltr, bottom and right should be negative
22 </div>
23 bottom and right should be negative
24 </div>
25 <div id="container" dir="rtl">
26 <div id=rtl>
27 If direction of containing block is rtl, bottom and left should be negative
28 </div>
29 bottom and left should be negative
30 </div>
31 <script>
32 var ltrElement = document.getElementById("ltr");
33 var rtlElement = document.getElementById("rtl");
34
35 shouldBe("window.getComputedStyle(ltrElement).top", "'5px'");
36 shouldBe("window.getComputedStyle(ltrElement).right", "'-5px'");
37 shouldBe("window.getComputedStyle(ltrElement).bottom", "'-5px'");
38 shouldBe("window.getComputedStyle(ltrElement).left", "'5px'");
39
40 shouldBe("window.getComputedStyle(rtlElement).top", "'5px'");
41 shouldBe("window.getComputedStyle(rtlElement).right", "'5px'");
42 shouldBe("window.getComputedStyle(rtlElement).bottom", "'-5px'");
43 shouldBe("window.getComputedStyle(rtlElement).left", "'-5px'");
44 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698