| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "printing/emf_win.h" | 5 #include "printing/emf_win.h" |
| 6 | 6 |
| 7 // For quick access. | 7 // For quick access. |
| 8 #include <stdint.h> |
| 8 #include <wingdi.h> | 9 #include <wingdi.h> |
| 9 #include <winspool.h> | 10 #include <winspool.h> |
| 10 | 11 |
| 11 #include <string> | 12 #include <string> |
| 12 | 13 |
| 13 #include "base/basictypes.h" | |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
| 16 #include "base/files/scoped_temp_dir.h" | 16 #include "base/files/scoped_temp_dir.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/path_service.h" | 18 #include "base/path_service.h" |
| 19 #include "base/win/scoped_hdc.h" | 19 #include "base/win/scoped_hdc.h" |
| 20 #include "printing/printing_context.h" | 20 #include "printing/printing_context.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "ui/gfx/geometry/point.h" | 22 #include "ui/gfx/geometry/point.h" |
| 23 #include "ui/gfx/geometry/size.h" | 23 #include "ui/gfx/geometry/size.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); | 226 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); |
| 227 | 227 |
| 228 raster = emf.RasterizeMetafile(16 * ONE_MB); | 228 raster = emf.RasterizeMetafile(16 * ONE_MB); |
| 229 // Expected size about 64MB. | 229 // Expected size about 64MB. |
| 230 EXPECT_LE(abs(static_cast<int>(raster->GetDataSize()) - 64 * ONE_MB), ONE_MB); | 230 EXPECT_LE(abs(static_cast<int>(raster->GetDataSize()) - 64 * ONE_MB), ONE_MB); |
| 231 // Bounds should still be the same. | 231 // Bounds should still be the same. |
| 232 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); | 232 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace printing | 235 } // namespace printing |
| OLD | NEW |