diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 17:52:23 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 17:52:23 +0000 |
commit | edc531f9ec270823787167f70c4c8c1ad45de146 (patch) | |
tree | 32bd3b45f3a93a4f060c82eda8d9c6a669bbd0ee /printing/pdf_ps_metafile_cairo_unittest.cc | |
parent | 3e7b5d650e797a288c51e6a74d4595dc0e555d0b (diff) | |
download | chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.zip chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.tar.gz chromium_src-edc531f9ec270823787167f70c4c8c1ad45de146.tar.bz2 |
Unifying StartPage across all platforms
Since there is already a getter method for retrieving the context, there is no reason for StartPage to return it. Also the parameter list can be uniform across all platforms. Some arguments are unused in order to achieve this.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6667069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/pdf_ps_metafile_cairo_unittest.cc')
-rw-r--r-- | printing/pdf_ps_metafile_cairo_unittest.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/printing/pdf_ps_metafile_cairo_unittest.cc b/printing/pdf_ps_metafile_cairo_unittest.cc index e180538..d4f2090 100644 --- a/printing/pdf_ps_metafile_cairo_unittest.cc +++ b/printing/pdf_ps_metafile_cairo_unittest.cc @@ -14,6 +14,7 @@ #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/size.h" +#include "ui/gfx/point.h" typedef struct _cairo cairo_t; @@ -31,15 +32,13 @@ TEST_F(PdfPsTest, Pdf) { EXPECT_TRUE(pdf.Init()); // Renders page 1. - cairo_t* context = pdf.StartPage(gfx::Size(72 + 2 + 4, 72 + 1 + 3), 1, 4); - EXPECT_TRUE(context != NULL); - EXPECT_EQ(printing::PdfPsMetafile::FromCairoContext(context), &pdf); + EXPECT_TRUE(pdf.StartPage(gfx::Size(72, 73), gfx::Point(4, 5), 1)); + EXPECT_EQ(printing::PdfPsMetafile::FromCairoContext(pdf.context()), &pdf); // In theory, we should use Cairo to draw something on |context|. EXPECT_TRUE(pdf.FinishPage()); // Renders page 2. - context = pdf.StartPage(gfx::Size(64 + 2 + 4, 64 + 1 + 3), 1, 4); - EXPECT_TRUE(context != NULL); + EXPECT_TRUE(pdf.StartPage(gfx::Size(72, 73), gfx::Point(4, 5), 1)); // In theory, we should use Cairo to draw something on |context|. EXPECT_TRUE(pdf.FinishPage()); @@ -72,8 +71,7 @@ TEST_F(PdfPsTest, Pdf) { // Test overriding the metafile with raw data. printing::PdfPsMetafile pdf3; EXPECT_TRUE(pdf3.Init()); - context = pdf3.StartPage(gfx::Size(72 + 2 + 4, 72 + 1 + 3), 1, 4); - EXPECT_TRUE(context != NULL); + EXPECT_TRUE(pdf3.StartPage(gfx::Size(72, 73), gfx::Point(4, 5), 1)); std::string test_raw_data = "Dummy PDF"; EXPECT_TRUE(pdf3.SetRawData(test_raw_data.c_str(), test_raw_data.size())); EXPECT_TRUE(pdf3.FinishPage()); |