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

Side by Side Diff: chrome/utility/cloud_print/pwg_encoder_unittest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "chrome/utility/cloud_print/bitmap_image.h" 10 #include "chrome/utility/cloud_print/bitmap_image.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 for (int j = 400; j < 500; j++) { 52 for (int j = 400; j < 500; j++) {
53 int row_start = j * kRasterWidth; 53 int row_start = j * kRasterWidth;
54 if ((i/40) % 2 == 0) { 54 if ((i/40) % 2 == 0) {
55 bitmap_data[row_start + i] = 255 << 8; 55 bitmap_data[row_start + i] = 255 << 8;
56 } else { 56 } else {
57 bitmap_data[row_start + i] = 255 << 16; 57 bitmap_data[row_start + i] = 255 << 16;
58 } 58 }
59 } 59 }
60 } 60 }
61 61
62 return bitmap_image.Pass(); 62 return bitmap_image;
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
67 TEST(PwgRasterTest, CompareWithMaster) { 67 TEST(PwgRasterTest, CompareWithMaster) {
68 std::string output; 68 std::string output;
69 PwgEncoder encoder; 69 PwgEncoder encoder;
70 scoped_ptr<BitmapImage> image = MakeSampleBitmap(); 70 scoped_ptr<BitmapImage> image = MakeSampleBitmap();
71 PwgHeaderInfo header_info; 71 PwgHeaderInfo header_info;
72 header_info.dpi = kRasterDPI; 72 header_info.dpi = kRasterDPI;
73 header_info.total_pages = 1; 73 header_info.total_pages = 1;
74 74
75 encoder.EncodeDocumentHeader(&output); 75 encoder.EncodeDocumentHeader(&output);
76 encoder.EncodePage(*image, header_info, &output); 76 encoder.EncodePage(*image, header_info, &output);
77 77
78 EXPECT_EQ(kPWGFileSha1, base::SHA1HashString(output)); 78 EXPECT_EQ(kPWGFileSha1, base::SHA1HashString(output));
79 } 79 }
80 80
81 } // namespace cloud_print 81 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698