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

Side by Side Diff: printing/emf_win_unittest.cc

Issue 628133002: Replacing the OVERRIDE with override and FINAL with final in /src/printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/emf_win.h" 5 #include "printing/emf_win.h"
6 6
7 // For quick access. 7 // For quick access.
8 #include <wingdi.h> 8 #include <wingdi.h>
9 #include <winspool.h> 9 #include <winspool.h>
10 10
(...skipping 23 matching lines...) Expand all
34 static bool IsTestCaseDisabled() { 34 static bool IsTestCaseDisabled() {
35 // It is assumed this printer is a HP Color LaserJet 4550 PCL or 4700. 35 // It is assumed this printer is a HP Color LaserJet 4550 PCL or 4700.
36 HDC hdc = CreateDC(L"WINSPOOL", L"UnitTest Printer", NULL, NULL); 36 HDC hdc = CreateDC(L"WINSPOOL", L"UnitTest Printer", NULL, NULL);
37 if (!hdc) 37 if (!hdc)
38 return true; 38 return true;
39 DeleteDC(hdc); 39 DeleteDC(hdc);
40 return false; 40 return false;
41 } 41 }
42 42
43 // PrintingContext::Delegate methods. 43 // PrintingContext::Delegate methods.
44 virtual gfx::NativeView GetParentView() OVERRIDE { return NULL; } 44 virtual gfx::NativeView GetParentView() override { return NULL; }
45 virtual std::string GetAppLocale() OVERRIDE { return std::string(); } 45 virtual std::string GetAppLocale() override { return std::string(); }
46 }; 46 };
47 47
48 const uint32 EMF_HEADER_SIZE = 128; 48 const uint32 EMF_HEADER_SIZE = 128;
49 49
50 } // namespace 50 } // namespace
51 51
52 TEST(EmfTest, DC) { 52 TEST(EmfTest, DC) {
53 // Simplest use case. 53 // Simplest use case.
54 uint32 size; 54 uint32 size;
55 std::vector<char> data; 55 std::vector<char> data;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); 225 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1));
226 226
227 raster = emf.RasterizeMetafile(16 * 1024 * 1024); 227 raster = emf.RasterizeMetafile(16 * 1024 * 1024);
228 // Expected size about 64MB. 228 // Expected size about 64MB.
229 EXPECT_LE(abs(int(raster->GetDataSize()) - 64 * 1024 * 1024), 1024 * 1024); 229 EXPECT_LE(abs(int(raster->GetDataSize()) - 64 * 1024 * 1024), 1024 * 1024);
230 // Bounds should still be the same. 230 // Bounds should still be the same.
231 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1)); 231 EXPECT_EQ(emf.GetPageBounds(1), raster->GetPageBounds(1));
232 } 232 }
233 233
234 } // namespace printing 234 } // namespace printing
OLDNEW
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698