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

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

Issue 1882373004: Migrate content/common/gpu/media code to media/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix several more bot-identified build issues Created 4 years, 8 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 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 <stdint.h> 5 #include <stdint.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include <string> 8 #include <string>
9 9
10 // This has to be included first. 10 // This has to be included first.
11 // See http://code.google.com/p/googletest/issues/detail?id=371 11 // See http://code.google.com/p/googletest/issues/detail?id=371
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 #include "base/at_exit.h" 14 #include "base/at_exit.h"
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/md5.h" 18 #include "base/md5.h"
19 #include "base/path_service.h" 19 #include "base/path_service.h"
20 #include "base/strings/string_piece.h" 20 #include "base/strings/string_piece.h"
21 #include "content/common/gpu/media/vaapi_jpeg_decoder.h"
22 #include "media/base/test_data_util.h" 21 #include "media/base/test_data_util.h"
23 #include "media/base/video_frame.h" 22 #include "media/base/video_frame.h"
24 #include "media/filters/jpeg_parser.h" 23 #include "media/filters/jpeg_parser.h"
24 #include "media/gpu/vaapi_jpeg_decoder.h"
25 25
26 namespace content { 26 namespace media {
27 namespace { 27 namespace {
28 28
29 const char* kTestFilename = "pixel-1280x720.jpg"; 29 const char* kTestFilename = "pixel-1280x720.jpg";
30 const char* kExpectedMd5Sum = "6e9e1716073c9a9a1282e3f0e0dab743"; 30 const char* kExpectedMd5Sum = "6e9e1716073c9a9a1282e3f0e0dab743";
31 31
32 void LogOnError() { 32 void LogOnError() {
33 LOG(FATAL) << "Oh noes! Decoder failed"; 33 LOG(FATAL) << "Oh noes! Decoder failed";
34 } 34 }
35 35
36 class VaapiJpegDecoderTest : public ::testing::Test { 36 class VaapiJpegDecoderTest : public ::testing::Test {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 std::vector<VASurfaceID> va_surfaces; 125 std::vector<VASurfaceID> va_surfaces;
126 ASSERT_TRUE( 126 ASSERT_TRUE(
127 wrapper_->CreateSurfaces(VA_RT_FORMAT_YUV420, size, 1, &va_surfaces)); 127 wrapper_->CreateSurfaces(VA_RT_FORMAT_YUV420, size, 1, &va_surfaces));
128 128
129 EXPECT_FALSE( 129 EXPECT_FALSE(
130 VaapiJpegDecoder::Decode(wrapper_.get(), parse_result, va_surfaces[0])); 130 VaapiJpegDecoder::Decode(wrapper_.get(), parse_result, va_surfaces[0]));
131 } 131 }
132 132
133 } // namespace 133 } // namespace
134 } // namespace content 134 } // namespace media
135 135
136 int main(int argc, char** argv) { 136 int main(int argc, char** argv) {
137 testing::InitGoogleTest(&argc, argv); 137 testing::InitGoogleTest(&argc, argv);
138 base::AtExitManager exit_manager; 138 base::AtExitManager exit_manager;
139 content::VaapiWrapper::PreSandboxInitialization(); 139 media::VaapiWrapper::PreSandboxInitialization();
140 return RUN_ALL_TESTS(); 140 return RUN_ALL_TESTS();
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698