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

Side by Side Diff: chrome/browser/resources/print_preview/print_preview_utils_test.html

Issue 7891016: Print Preview: Adding UI for margin settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing tests again. Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>print_preview_utils.js tests</title> 4 <title>print_preview_utils.js tests</title>
5 <script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.j s"></script> 5 <script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.j s"></script>
6 <script src="print_preview_utils.js"></script> 6 <script src="print_preview_utils.js"></script>
7 <script> 7 <script>
8 goog.require('goog.testing.jsunit'); 8 goog.require('goog.testing.jsunit');
9 </script> 9 </script>
10 </head> 10 </head>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 var pageRanges = pageSetToPageRanges([1,2,3,7,8,9,11]); 98 var pageRanges = pageSetToPageRanges([1,2,3,7,8,9,11]);
99 assertEquals(pageRanges.length, 3); 99 assertEquals(pageRanges.length, 3);
100 assertEquals(pageRanges[0].from, 1); 100 assertEquals(pageRanges[0].from, 1);
101 assertEquals(pageRanges[0].to, 3); 101 assertEquals(pageRanges[0].to, 3);
102 assertEquals(pageRanges[1].from, 7); 102 assertEquals(pageRanges[1].from, 7);
103 assertEquals(pageRanges[1].to, 9); 103 assertEquals(pageRanges[1].to, 9);
104 assertEquals(pageRanges[2].from, 11); 104 assertEquals(pageRanges[2].from, 11);
105 assertEquals(pageRanges[2].to, 11); 105 assertEquals(pageRanges[2].to, 11);
106 } 106 }
107 107
108 function testConvertInchesToPoints() {
109 assertEquals(convertInchesToPoints(1), 72);
110 assertEquals(convertInchesToPoints(2), 144);
111 assertEquals(convertInchesToPoints(0.45), 32.4);
112 }
113
114 function testConvertPointsToInches() {
115 assertEquals(convertPointsToInches(72), 1);
116 assertEquals(convertPointsToInches(144), 2);
117 assertEquals(convertPointsToInches(32.4), 0.45);
118 }
119
108 </script> 120 </script>
109 </body> 121 </body>
110 </html> 122 </html>
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview_utils.js ('k') | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698