diff options
author | vitalybuka <vitalybuka@chromium.org> | 2014-08-23 14:28:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-23 21:37:13 +0000 |
commit | effe183eae93f6a633c7d3a8e88e77d11e737924 (patch) | |
tree | 7a38bbef86ce2cc4a05834f118e544d9de30b977 /printing/emf_win_unittest.cc | |
parent | a9438c47225d119a953ebf195210e655cb88dbc5 (diff) | |
download | chromium_src-effe183eae93f6a633c7d3a8e88e77d11e737924.zip chromium_src-effe183eae93f6a633c7d3a8e88e77d11e737924.tar.gz chromium_src-effe183eae93f6a633c7d3a8e88e77d11e737924.tar.bz2 |
Added PrintingContext::Delegate to get parent view handle and application locale.
BUG=374321
Review URL: https://codereview.chromium.org/478183005
Cr-Commit-Position: refs/heads/master@{#291584}
Diffstat (limited to 'printing/emf_win_unittest.cc')
-rw-r--r-- | printing/emf_win_unittest.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc index 8a5daaf..ec65c28 100644 --- a/printing/emf_win_unittest.cc +++ b/printing/emf_win_unittest.cc @@ -22,11 +22,13 @@ #include "ui/gfx/point.h" #include "ui/gfx/size.h" +namespace printing { + namespace { // This test is automatically disabled if no printer named "UnitTest Printer" is // available. -class EmfPrintingTest : public testing::Test { +class EmfPrintingTest : public testing::Test, public PrintingContext::Delegate { public: typedef testing::Test Parent; static bool IsTestCaseDisabled() { @@ -37,14 +39,16 @@ class EmfPrintingTest : public testing::Test { DeleteDC(hdc); return false; } + + // PrintingContext::Delegate methods. + virtual gfx::NativeView GetParentView() OVERRIDE { return NULL; } + virtual std::string GetAppLocale() OVERRIDE { return std::string(); } }; const uint32 EMF_HEADER_SIZE = 128; } // namespace -namespace printing { - TEST(EmfTest, DC) { // Simplest use case. uint32 size; @@ -83,7 +87,7 @@ TEST_F(EmfPrintingTest, Enumerate) { settings.set_device_name(L"UnitTest Printer"); // Initialize it. - scoped_ptr<PrintingContext> context(PrintingContext::Create(std::string())); + scoped_ptr<PrintingContext> context(PrintingContext::Create(this)); EXPECT_EQ(context->InitWithSettings(settings), PrintingContext::OK); base::FilePath emf_file; |