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

Side by Side Diff: LayoutTests/fast/sub-pixel/size-of-span-with-different-positions.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 .testContent { 4 .testContent {
5 font-face: Arial; font-size: 16px; 5 font-face: Arial; font-size: 16px;
6 } 6 }
7 </style> 7 </style>
8 </head> 8 </head>
9 <body> 9 <body>
10 <div id="testContent"> 10 <div id="testContent">
11 <span id="span-position-static" style="position:static">T</span> 11 <span id="span-position-static" style="position:static">T</span>
12 <span id="span-position-fixed" style="position:fixed">T</span> 12 <span id="span-position-fixed" style="position:fixed">T</span>
13 <span id="span-position-absolute" style="position:absolute">T</span> 13 <span id="span-position-absolute" style="position:absolute">T</span>
14 <span id="span-position-relative" style="position:relative">T</span> 14 <span id="span-position-relative" style="position:relative">T</span>
15 </div> 15 </div>
16 <script src="../js/resources/js-test-pre.js"></script> 16 <script src="../js/resources/js-test-pre.js"></script>
17 <script> 17 <script>
18 description("Test case for bug 90097. This tests span sizes with different C SS position attributes."); 18 description("Test case for bug 90097. This tests span sizes with different C SS position attributes.");
19 var spans = testContent.querySelectorAll('span'); 19 var spans = testContent.querySelectorAll('span');
20 var expected_width = document.getElementById('span-position-static').getBoun dingClientRect().width; 20 var expected_width = document.getElementById('span-position-static').getBoun dingClientRect().width;
21 // if expected_width is integral, all should match, otherwise should be clos e 21 // if expected_width is integral, all should match, otherwise should be clos e
22 var tolerance = expected_width % 1.0 == 0.0 ? 0.0 : 1.0 / 60; 22 var tolerance = expected_width % 1.0 == 0.0 ? 0.0 : 1.0 / 60;
23 23
24 shouldBeCloseTo('document.getElementById("span-position-fixed").getBoundingC lientRect().width', expected_width, tolerance, true); 24 shouldBeCloseTo('document.getElementById("span-position-fixed").getBoundingC lientRect().width', expected_width, tolerance, true);
25 shouldBeCloseTo('document.getElementById("span-position-absolute").getBoundi ngClientRect().width', expected_width, tolerance, true); 25 shouldBeCloseTo('document.getElementById("span-position-absolute").getBoundi ngClientRect().width', expected_width, tolerance, true);
26 shouldBeCloseTo('document.getElementById("span-position-relative").getBoundi ngClientRect().width', expected_width, tolerance, true); 26 shouldBeCloseTo('document.getElementById("span-position-relative").getBoundi ngClientRect().width', expected_width, tolerance, true);
27 document.getElementById("testContent").style.display = 'none'; 27 document.getElementById("testContent").style.display = 'none';
28 </script> 28 </script>
29 <script src="../js/resources/js-test-post.js"></script>
30 </body> 29 </body>
31 </html> 30 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/sub-pixel/client-width-height-snapping.html ('k') | LayoutTests/fast/table/border-changes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698