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

Side by Side Diff: media/gpu/ipc/service/gpu_jpeg_decode_accelerator_unittest.cc

Issue 2713993003: Revert of build: Enable auto raw pointer deduction check on linux. (Closed)
Patch Set: Created 3 years, 10 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 | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/mojo/clients/mojo_renderer.cc » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "gpu/ipc/service/gpu_channel.h" 9 #include "gpu/ipc/service/gpu_channel.h"
10 #include "media/gpu/ipc/common/media_messages.h" 10 #include "media/gpu/ipc/common/media_messages.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::MessageLoop message_loop_; 83 base::MessageLoop message_loop_;
84 }; 84 };
85 85
86 // Tests that the communication for decoding a frame between the caller of 86 // Tests that the communication for decoding a frame between the caller of
87 // IPC:MessageFilter and the media::JpegDecodeAccelerator works as expected. 87 // IPC:MessageFilter and the media::JpegDecodeAccelerator works as expected.
88 TEST_F(GpuJpegDecodeAcceleratorTest, DecodeFrameCallArrivesAtDecoder) { 88 TEST_F(GpuJpegDecodeAcceleratorTest, DecodeFrameCallArrivesAtDecoder) {
89 static const int32_t kArbitraryRouteId = 123; 89 static const int32_t kArbitraryRouteId = 123;
90 auto io_task_runner = io_thread_.task_runner(); 90 auto io_task_runner = io_thread_.task_runner();
91 auto main_task_runner = base::ThreadTaskRunnerHandle::Get(); 91 auto main_task_runner = base::ThreadTaskRunnerHandle::Get();
92 auto decoder = base::MakeUnique<MockJpegDecodeAccelerator>(); 92 auto decoder = base::MakeUnique<MockJpegDecodeAccelerator>();
93 auto* decoder_ptr = decoder.get(); 93 auto decoder_ptr = decoder.get();
94 ON_CALL(*decoder, Initialize(_)).WillByDefault(Return(true)); 94 ON_CALL(*decoder, Initialize(_)).WillByDefault(Return(true));
95 95
96 IPC::MessageFilter* message_filter = nullptr; 96 IPC::MessageFilter* message_filter = nullptr;
97 EXPECT_CALL(*this, GetMockJpegDecodeAccelerator(_)) 97 EXPECT_CALL(*this, GetMockJpegDecodeAccelerator(_))
98 .WillOnce(InvokeWithoutArgs([&decoder]() { return std::move(decoder); })); 98 .WillOnce(InvokeWithoutArgs([&decoder]() { return std::move(decoder); }));
99 EXPECT_CALL(gpu_channel_, AddFilter(_)).WillOnce(SaveArg<0>(&message_filter)); 99 EXPECT_CALL(gpu_channel_, AddFilter(_)).WillOnce(SaveArg<0>(&message_filter));
100 base::RunLoop run_loop; 100 base::RunLoop run_loop;
101 auto response_cb = base::Bind( 101 auto response_cb = base::Bind(
102 [](base::RunLoop* run_loop, 102 [](base::RunLoop* run_loop,
103 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 103 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
(...skipping 17 matching lines...) Expand all
121 EXPECT_CALL(*decoder_ptr, Decode(_, _)); 121 EXPECT_CALL(*decoder_ptr, Decode(_, _));
122 io_task_runner->PostTaskAndReply( 122 io_task_runner->PostTaskAndReply(
123 FROM_HERE, 123 FROM_HERE,
124 base::Bind(&GpuJpegDecodeAcceleratorTest::SendStubFrame, 124 base::Bind(&GpuJpegDecodeAcceleratorTest::SendStubFrame,
125 base::Unretained(this), message_filter, kArbitraryRouteId), 125 base::Unretained(this), message_filter, kArbitraryRouteId),
126 run_loop2.QuitClosure()); 126 run_loop2.QuitClosure());
127 run_loop2.Run(); 127 run_loop2.Run();
128 } 128 }
129 129
130 } // namespace media 130 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/mojo/clients/mojo_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698