From 6f0db2b2c15a0919bbeeb6568c69b7196b186d27 Mon Sep 17 00:00:00 2001 From: "cpu@chromium.org" Date: Tue, 14 Feb 2012 03:56:18 +0000 Subject: 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 --- printing/emf_win_unittest.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'printing') 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 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; -- cgit v1.1