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

Unified Diff: chrome/browser/resources/print_preview/print_preview_utils_test.html

Issue 8345025: Print Preview: Adding support for localized margin units and format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_preview_utils_test.html
diff --git a/chrome/browser/resources/print_preview/print_preview_utils_test.html b/chrome/browser/resources/print_preview/print_preview_utils_test.html
index c6339542a0c0964a3da78069adf04cfa3fbc6fae..3d2106171e6cd8165d8ebb096ff317f8b4aac444 100644
--- a/chrome/browser/resources/print_preview/print_preview_utils_test.html
+++ b/chrome/browser/resources/print_preview/print_preview_utils_test.html
@@ -114,7 +114,19 @@ function testConvertInchesToPoints() {
function testConvertPointsToInches() {
assertEquals(convertPointsToInches(72), 1);
assertEquals(convertPointsToInches(144), 2);
- assertEquals(convertPointsToInches(32.4), 0.45);
+ assertEquals(convertPointsToInches(36), 0.5);
+}
+
+function testConvertMillimetersToPoints() {
+ assertEquals(convertMillimetersToPoints(10), 28.3464567);
Evan Stade 2011/10/22 00:30:45 I don't think these tests are super useful, you ar
dpapad 2011/10/22 00:47:29 I agree. Basically these tests only cover the case
+ assertEquals(convertMillimetersToPoints(20), 56.6929134);
+ assertEquals(convertMillimetersToPoints(4.5), 12.755905515);
+}
+
+function testConvertPointsToMillimeters() {
+ assertEquals(convertPointsToMillimeters(73.70078742), 26);
+ assertEquals(convertPointsToMillimeters(34.01574804), 12);
+ assertEquals(convertPointsToMillimeters(144.56692917), 51);
}
</script>
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview_utils.js ('k') | chrome/browser/ui/webui/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698