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

Side by Side Diff: remoting/host/shaped_desktop_capturer_unittest.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 "remoting/host/shaped_desktop_capturer.h" 5 #include "remoting/host/shaped_desktop_capturer.h"
6 6
7 #include "remoting/host/desktop_shape_tracker.h" 7 #include "remoting/host/desktop_shape_tracker.h"
8 #include "remoting/host/fake_desktop_capturer.h" 8 #include "remoting/host/fake_desktop_capturer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
(...skipping 24 matching lines...) Expand all
35 35
36 private: 36 private:
37 webrtc::DesktopRegion shape_; 37 webrtc::DesktopRegion shape_;
38 }; 38 };
39 39
40 class ShapedDesktopCapturerTest : public testing::Test, 40 class ShapedDesktopCapturerTest : public testing::Test,
41 public webrtc::DesktopCapturer::Callback { 41 public webrtc::DesktopCapturer::Callback {
42 public: 42 public:
43 // webrtc::DesktopCapturer::Callback interface 43 // webrtc::DesktopCapturer::Callback interface
44 webrtc::SharedMemory* CreateSharedMemory(size_t size) override { 44 webrtc::SharedMemory* CreateSharedMemory(size_t size) override {
45 return NULL; 45 return nullptr;
46 } 46 }
47 47
48 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override { 48 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override {
49 last_frame_.reset(frame); 49 last_frame_.reset(frame);
50 } 50 }
51 51
52 scoped_ptr<webrtc::DesktopFrame> last_frame_; 52 scoped_ptr<webrtc::DesktopFrame> last_frame_;
53 }; 53 };
54 54
55 // Verify that captured frame have shape. 55 // Verify that captured frame have shape.
56 TEST_F(ShapedDesktopCapturerTest, Basic) { 56 TEST_F(ShapedDesktopCapturerTest, Basic) {
57 ShapedDesktopCapturer capturer( 57 ShapedDesktopCapturer capturer(
58 make_scoped_ptr(new FakeDesktopCapturer()), 58 make_scoped_ptr(new FakeDesktopCapturer()),
59 make_scoped_ptr(new FakeDesktopShapeTracker())); 59 make_scoped_ptr(new FakeDesktopShapeTracker()));
60 capturer.Start(this); 60 capturer.Start(this);
61 capturer.Capture(webrtc::DesktopRegion()); 61 capturer.Capture(webrtc::DesktopRegion());
62 ASSERT_TRUE(last_frame_.get()); 62 ASSERT_TRUE(last_frame_.get());
63 ASSERT_TRUE(last_frame_->shape()); 63 ASSERT_TRUE(last_frame_->shape());
64 EXPECT_TRUE( 64 EXPECT_TRUE(
65 FakeDesktopShapeTracker::CreateShape().Equals(*last_frame_->shape())); 65 FakeDesktopShapeTracker::CreateShape().Equals(*last_frame_->shape()));
66 } 66 }
67 67
68 } // namespace remoting 68 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/shaped_desktop_capturer.cc ('k') | remoting/host/single_window_input_injector_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698