diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 03:56:18 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 03:56:18 +0000 |
commit | 6f0db2b2c15a0919bbeeb6568c69b7196b186d27 (patch) | |
tree | a9e1c0067cba88556eff8541dfd87b09acd0a16c /printing/emf_win_unittest.cc | |
parent | 46db9f43fe29b92895d3138a22d3bc042632135a (diff) | |
download | chromium_src-6f0db2b2c15a0919bbeeb6568c69b7196b186d27.zip chromium_src-6f0db2b2c15a0919bbeeb6568c69b7196b186d27.tar.gz chromium_src-6f0db2b2c15a0919bbeeb6568c69b7196b186d27.tar.bz2 |
Revert 121840 - Make scoped dc objects smarter
So we don't destroy the dc with gdi objects selected.
Also remove implicit conversion to HDC.
BUG=110113,113683
TEST=chrome runs, base unittests green.
Review URL: https://chromiumcodereview.appspot.com/9212020
TBR=cpu@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9387027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/emf_win_unittest.cc')
-rw-r--r-- | printing/emf_win_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc index 5ed83d1..add23f9 100644 --- a/printing/emf_win_unittest.cc +++ b/printing/emf_win_unittest.cc @@ -127,7 +127,7 @@ TEST_F(EmfPrintingTest, Enumerate) { TEST_F(EmfPrintingTest, PageBreak) { base::win::ScopedCreateDC dc( CreateDC(L"WINSPOOL", L"UnitTest Printer", NULL, NULL)); - if (!dc.get()) + if (!dc.Get()) return; uint32 size; std::vector<BYTE> data; @@ -153,11 +153,11 @@ TEST_F(EmfPrintingTest, PageBreak) { DOCINFO di = {0}; di.cbSize = sizeof(DOCINFO); di.lpszDocName = L"Test Job"; - int job_id = ::StartDoc(dc.get(), &di); + int job_id = ::StartDoc(dc.Get(), &di); Emf emf; EXPECT_TRUE(emf.InitFromData(&data.front(), size)); - EXPECT_TRUE(emf.SafePlayback(dc.get())); - ::EndDoc(dc.get()); + EXPECT_TRUE(emf.SafePlayback(dc.Get())); + ::EndDoc(dc.Get()); // Since presumably the printer is not real, let us just delete the job from // the queue. HANDLE printer = NULL; |