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

Side by Side Diff: media/capture/video/fake_video_capture_device_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/capture/video/fake_video_capture_device.h" 5 #include "media/capture/video/fake_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 public: 82 public:
83 StubReadWritePermission(uint8_t* data) : data_(data) {} 83 StubReadWritePermission(uint8_t* data) : data_(data) {}
84 ~StubReadWritePermission() override { delete[] data_; } 84 ~StubReadWritePermission() override { delete[] data_; }
85 85
86 private: 86 private:
87 uint8_t* const data_; 87 uint8_t* const data_;
88 }; 88 };
89 89
90 VideoCaptureDevice::Client::Buffer CreateStubBuffer(int buffer_id, 90 VideoCaptureDevice::Client::Buffer CreateStubBuffer(int buffer_id,
91 size_t mapped_size) { 91 size_t mapped_size) {
92 auto buffer = new uint8_t[mapped_size]; 92 auto* buffer = new uint8_t[mapped_size];
93 const int arbitrary_frame_feedback_id = 0; 93 const int arbitrary_frame_feedback_id = 0;
94 return VideoCaptureDevice::Client::Buffer( 94 return VideoCaptureDevice::Client::Buffer(
95 buffer_id, arbitrary_frame_feedback_id, 95 buffer_id, arbitrary_frame_feedback_id,
96 base::MakeUnique<StubBufferHandleProvider>(mapped_size, buffer), 96 base::MakeUnique<StubBufferHandleProvider>(mapped_size, buffer),
97 base::MakeUnique<StubReadWritePermission>(buffer)); 97 base::MakeUnique<StubReadWritePermission>(buffer));
98 }; 98 };
99 99
100 class MockClient : public VideoCaptureDevice::Client { 100 class MockClient : public VideoCaptureDevice::Client {
101 public: 101 public:
102 MOCK_METHOD2(OnError, 102 MOCK_METHOD2(OnError,
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 INSTANTIATE_TEST_CASE_P( 523 INSTANTIATE_TEST_CASE_P(
524 , 524 ,
525 FakeVideoCaptureDeviceCommandLineTest, 525 FakeVideoCaptureDeviceCommandLineTest,
526 Values(CommandLineTestData{"fps=-1", 5, 1u}, 526 Values(CommandLineTestData{"fps=-1", 5, 1u},
527 CommandLineTestData{"fps=29.97, device-count=1", 29.97f, 1u}, 527 CommandLineTestData{"fps=29.97, device-count=1", 29.97f, 1u},
528 CommandLineTestData{"fps=60, device-count=2", 60, 2u}, 528 CommandLineTestData{"fps=60, device-count=2", 60, 2u},
529 CommandLineTestData{"fps=1000, device-count=-1", 60, 1u}, 529 CommandLineTestData{"fps=1000, device-count=-1", 60, 1u},
530 CommandLineTestData{"device-count=2", 20, 2u}, 530 CommandLineTestData{"device-count=2", 20, 2u},
531 CommandLineTestData{"device-count=0", 20, 1u})); 531 CommandLineTestData{"device-count=0", 20, 1u}));
532 }; // namespace media 532 }; // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698