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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/sub-pixel/width-of-inline-in-float.html

Issue 1922223003: Change linesBoundingBox to return LayoutRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test reported width of inline in float</title>
5 <style>
6 #outer {
7 float: left;
8 font-size: 15px;
9 }
10 p {
11 clear: left;
12 }
13 </style>
14 <script src="../../resources/testharness.js"></script>
15 <script src="../../resources/testharnessreport.js"></script>
16 </head>
17 <body>
18 <span id="outer"><span id="inner">Customer Supportz</span></span>
19 <p>
20 The reported inner width must be the same as the outer width.
21 </p>
22 <script>
23 test(function() {
24 var outer = document.getElementById('outer');
25 var inner = document.getElementById('inner');
26
27 assert_equals(outer.offsetWidth, inner.offsetWidth,
28 'Inner offsetWidth must match outer offsetWidth.');
29
30 assert_equals(outer.offsetWidth,
31 Math.round(outer.getBoundingClientRect().width),
32 'Outer offsetWidth must match rounded width.');
33
34 assert_equals(inner.offsetWidth,
35 Math.round(inner.getBoundingClientRect().width),
36 'Inner offsetWidth must match rounded width.');
37 });
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698