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

Side by Side Diff: content/common/gpu/media/vaapi_jpeg_decoder_unittest.cc

Issue 1521823002: Fix compile issue of jpeg decoder unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <string> 5 #include <string>
6 6
7 // This has to be included first. 7 // This has to be included first.
8 // See http://code.google.com/p/googletest/issues/detail?id=371 8 // See http://code.google.com/p/googletest/issues/detail?id=371
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 28 matching lines...) Expand all
39 wrapper_ = VaapiWrapper::Create(VaapiWrapper::kDecode, 39 wrapper_ = VaapiWrapper::Create(VaapiWrapper::kDecode,
40 VAProfileJPEGBaseline, report_error_cb); 40 VAProfileJPEGBaseline, report_error_cb);
41 ASSERT_TRUE(wrapper_); 41 ASSERT_TRUE(wrapper_);
42 42
43 base::FilePath input_file = media::GetTestDataFilePath(kTestFilename); 43 base::FilePath input_file = media::GetTestDataFilePath(kTestFilename);
44 44
45 ASSERT_TRUE(base::ReadFileToString(input_file, &jpeg_data_)) 45 ASSERT_TRUE(base::ReadFileToString(input_file, &jpeg_data_))
46 << "failed to read input data from " << input_file.value(); 46 << "failed to read input data from " << input_file.value();
47 } 47 }
48 48
49 void TearDown() override { wrapper_.reset(); } 49 void TearDown() override { wrapper_ = nullptr; }
50 50
51 bool VerifyDecode(const media::JpegParseResult& parse_result, 51 bool VerifyDecode(const media::JpegParseResult& parse_result,
52 const std::string& md5sum); 52 const std::string& md5sum);
53 53
54 protected: 54 protected:
55 scoped_refptr<VaapiWrapper> wrapper_; 55 scoped_refptr<VaapiWrapper> wrapper_;
56 std::string jpeg_data_; 56 std::string jpeg_data_;
57 }; 57 };
58 58
59 bool VaapiJpegDecoderTest::VerifyDecode( 59 bool VaapiJpegDecoderTest::VerifyDecode(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 } // namespace 130 } // namespace
131 } // namespace content 131 } // namespace content
132 132
133 int main(int argc, char** argv) { 133 int main(int argc, char** argv) {
134 testing::InitGoogleTest(&argc, argv); 134 testing::InitGoogleTest(&argc, argv);
135 base::AtExitManager exit_manager; 135 base::AtExitManager exit_manager;
136 content::VaapiWrapper::PreSandboxInitialization(); 136 content::VaapiWrapper::PreSandboxInitialization();
137 return RUN_ALL_TESTS(); 137 return RUN_ALL_TESTS();
138 } 138 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698