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

Side by Side Diff: LayoutTests/fast/css/absolute-position-with-negative-width.html

Issue 578723003: Don't allow negative width for positioned elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test Created 6 years, 3 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>
rune 2014/09/17 11:32:57 No need to include html, head or body elements.
Kyungtae Kim 2014/09/18 12:50:07 Done.
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script type="text/javascript">
rune 2014/09/17 11:32:56 Drop the type attribute.
Kyungtae Kim 2014/09/18 12:50:06 Done.
6 function test()
7 {
8 if (!window.testRunner)
rune 2014/09/17 11:32:57 There nothing below relying on testRunner below af
Kyungtae Kim 2014/09/18 12:50:06 Done.
9 return;
10 absolute_with_left_right = document.getElementById("absolute_with_le ft_right");
11 shouldBe("absolute_with_left_right.getBoundingClientRect().width","0 ");
12 shouldBe("absolute_with_left_right.getClientRects()[0].width","0");
13 shouldBe("absolute_with_left_right.offsetWidth","0");
14 absolute_with_negative_width = document.getElementById("absolute_wit h_negative_width");
15 shouldBe("absolute_with_negative_width.getBoundingClientRect().width ","0");
16 shouldBe("absolute_with_negative_width.getClientRects()[0].width","0 ");
17 shouldBe("absolute_with_negative_width.offsetWidth","0");
18 }
19 </script>
20 </head>
21 <body onLoad="test()">
rune 2014/09/17 11:32:57 Why does this test need to wait for the onload eve
Kyungtae Kim 2014/09/18 12:50:07 Done.
22 <div style="position: relative; width: 0px">
23 <div style="position: absolute; left: 1px; right: 1px;" id="absolute_wit h_left_right"></div>
24 <div style="position: absolute; left: 1px; right: 1px; width:-10px" id=" absolute_with_negative_width"></div>
rune 2014/09/17 11:32:56 This element and corresponding tests don't add any
Kyungtae Kim 2014/09/18 12:50:07 Done.
25 </div>
26 </body>
27 </html>
28
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698