Index: printing/emf_win_unittest.cc |
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc |
index d8b3121ad7d9b2bee9ae37afbb5f7b341fcf0cac..e98b628a0796df5d94a33421b215ca6d8e91556b 100644 |
--- a/printing/emf_win_unittest.cc |
+++ b/printing/emf_win_unittest.cc |
@@ -47,7 +47,6 @@ class EmfPrintingTest : public testing::Test, public PrintingContext::Delegate { |
}; |
const uint32_t EMF_HEADER_SIZE = 128; |
-const int ONE_MB = 1024 * 1024; |
} // namespace |
@@ -211,29 +210,4 @@ TEST(EmfTest, FileBackedEmf) { |
EXPECT_TRUE(DeleteDC(hdc)); |
} |
-TEST(EmfTest, RasterizeMetafile) { |
- Emf emf; |
- EXPECT_TRUE(emf.Init()); |
- EXPECT_TRUE(emf.context()); |
- HBRUSH brush = static_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)); |
- for (int i = 0; i < 4; ++i) { |
- RECT rect = { 5 + i, 5 + i, 5 + i + 1, 5 + i + 2}; |
- FillRect(emf.context(), &rect, brush); |
- } |
- EXPECT_TRUE(emf.FinishDocument()); |
- |
- std::unique_ptr<Emf> raster(emf.RasterizeMetafile(1)); |
- // Just 1px bitmap but should be stretched to the same bounds. |
- EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); |
- |
- raster = emf.RasterizeMetafile(20); |
- EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); |
- |
- raster = emf.RasterizeMetafile(16 * ONE_MB); |
- // Expected size about 64MB. |
- EXPECT_LE(abs(static_cast<int>(raster->GetDataSize()) - 64 * ONE_MB), ONE_MB); |
- // Bounds should still be the same. |
- EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); |
-} |
- |
} // namespace printing |