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

Unified Diff: printing/emf_win_unittest.cc

Issue 568633002: Extracted MetafilePlayer interface from printing::MetafilePlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_expose
Patch Set: Thu Sep 11 22:54:16 PDT 2014 Created 6 years, 3 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
« no previous file with comments | « printing/emf_win.cc ('k') | printing/metafile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/emf_win_unittest.cc
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc
index ad4d8c3885db767123f3724ed26d6b054cbd7a95..451a532f062a2e9d57ce4fc52f9e2cfefbcdb825 100644
--- a/printing/emf_win_unittest.cc
+++ b/printing/emf_win_unittest.cc
@@ -52,7 +52,7 @@ const uint32 EMF_HEADER_SIZE = 128;
TEST(EmfTest, DC) {
// Simplest use case.
uint32 size;
- std::vector<BYTE> data;
+ std::vector<char> data;
{
Emf emf;
EXPECT_TRUE(emf.Init());
@@ -134,7 +134,7 @@ TEST_F(EmfPrintingTest, PageBreak) {
if (!dc.Get())
return;
uint32 size;
- std::vector<BYTE> data;
+ std::vector<char> data;
{
Emf emf;
EXPECT_TRUE(emf.Init());
@@ -179,7 +179,7 @@ TEST(EmfTest, FileBackedEmf) {
EXPECT_TRUE(base::CreateTemporaryFileInDir(scratch_metafile_dir.path(),
&metafile_path));
uint32 size;
- std::vector<BYTE> data;
+ std::vector<char> data;
{
Emf emf;
EXPECT_TRUE(emf.InitToFile(metafile_path));
@@ -221,12 +221,12 @@ TEST(EmfTest, RasterizeMetafile) {
// Just 1px bitmap but should be stretched to the same bounds.
EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1));
- raster.reset(emf.RasterizeMetafile(20));
+ raster = emf.RasterizeMetafile(20);
EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1));
- raster.reset(emf.RasterizeMetafile(16*1024*1024));
+ raster = emf.RasterizeMetafile(16 * 1024 * 1024);
// Expected size about 64MB.
- EXPECT_LE(abs(int(raster->GetDataSize()) - 64*1024*1024), 1024*1024);
+ EXPECT_LE(abs(int(raster->GetDataSize()) - 64 * 1024 * 1024), 1024 * 1024);
// Bounds should still be the same.
EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1));
}
« no previous file with comments | « printing/emf_win.cc ('k') | printing/metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698