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

Side by Side Diff: LayoutTests/fast/sub-pixel/tiled-canvas-elements.html

Issue 58533003: Move fast/js/resources files to resources. (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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 #console { margin-top: 40px; } 5 #console { margin-top: 40px; }
6 </style> 6 </style>
7 <script src="../js/resources/js-test-pre.js"></script> 7 <script src="../../resources/js-test.js"></script>
8 </head> 8 </head>
9 9
10 <body style="zoom: 1.1"> 10 <body style="zoom: 1.1">
11 <div> 11 <div>
12 <canvas style="position: absolute; top: 0px; left: 0px; background-c olor: black;" width="32" height="32"></canvas> 12 <canvas style="position: absolute; top: 0px; left: 0px; background-c olor: black;" width="32" height="32"></canvas>
13 <canvas style="position: absolute; top: 0px; left: 32px; background- color: black;" width="32" height="32"></canvas> 13 <canvas style="position: absolute; top: 0px; left: 32px; background- color: black;" width="32" height="32"></canvas>
14 <canvas style="position: absolute; top: 0px; left: 64px; background- color: black;" width="32" height="32"></canvas> 14 <canvas style="position: absolute; top: 0px; left: 64px; background- color: black;" width="32" height="32"></canvas>
15 <canvas style="position: absolute; top: 0px; left: 96px; background- color: black;" width="32" height="32"></canvas> 15 <canvas style="position: absolute; top: 0px; left: 96px; background- color: black;" width="32" height="32"></canvas>
16 </div> 16 </div>
17 17
18 <script> 18 <script>
19 function r(n) { 19 function r(n) {
20 return Math.round(n * 1000) / 1000; 20 return Math.round(n * 1000) / 1000;
21 } 21 }
22 22
23 var expected = 0; 23 var expected = 0;
24 var elements = document.getElementsByTagName('canvas'); 24 var elements = document.getElementsByTagName('canvas');
25 for (var el, i = 0; el = elements[i]; i++) { 25 for (var el, i = 0; el = elements[i]; i++) {
26 var rect = el.getBoundingClientRect(); 26 var rect = el.getBoundingClientRect();
27 if (Math.round(expected) == Math.round(rect.left)) 27 if (Math.round(expected) == Math.round(rect.left))
28 testPassed('Left edge of block lines up with right edge of p revious block.'); 28 testPassed('Left edge of block lines up with right edge of p revious block.');
29 else 29 else
30 shouldBe('Math.round(rect.left)', String(Math.round(expected ))); 30 shouldBe('Math.round(rect.left)', String(Math.round(expected )));
31 expected += rect.width; 31 expected += rect.width;
32 } 32 }
33 </script> 33 </script>
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/sub-pixel/table-cells-with-padding-do-not-wrap.html ('k') | LayoutTests/fast/table/border-changes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698