OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/printing/page_setup.h" | 5 #include "printing/page_setup.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <time.h> | 8 #include <time.h> |
9 | 9 |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 TEST(PageSetupTest, Random) { | 12 TEST(PageSetupTest, Random) { |
13 time_t seed = time(NULL); | 13 time_t seed = time(NULL); |
14 int kMax = 10; | 14 int kMax = 10; |
15 srand(static_cast<unsigned>(seed)); | 15 srand(static_cast<unsigned>(seed)); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 " " << page_size << " " << printable_area << " " << kTextHeight; | 137 " " << page_size << " " << printable_area << " " << kTextHeight; |
138 EXPECT_EQ(effective_margins.left, setup.effective_margins().left) << | 138 EXPECT_EQ(effective_margins.left, setup.effective_margins().left) << |
139 " " << page_size << " " << printable_area << " " << kTextHeight; | 139 " " << page_size << " " << printable_area << " " << kTextHeight; |
140 EXPECT_EQ(effective_margins.top, setup.effective_margins().top) << | 140 EXPECT_EQ(effective_margins.top, setup.effective_margins().top) << |
141 " " << page_size << " " << printable_area << " " << kTextHeight; | 141 " " << page_size << " " << printable_area << " " << kTextHeight; |
142 EXPECT_EQ(effective_margins.right, setup.effective_margins().right) << | 142 EXPECT_EQ(effective_margins.right, setup.effective_margins().right) << |
143 " " << page_size << " " << printable_area << " " << kTextHeight; | 143 " " << page_size << " " << printable_area << " " << kTextHeight; |
144 EXPECT_EQ(effective_margins.bottom, setup.effective_margins().bottom) << | 144 EXPECT_EQ(effective_margins.bottom, setup.effective_margins().bottom) << |
145 " " << page_size << " " << printable_area << " " << kTextHeight; | 145 " " << page_size << " " << printable_area << " " << kTextHeight; |
146 } | 146 } |
OLD | NEW |