OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 char* buffer_; | 51 char* buffer_; |
52 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemory); | 52 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemory); |
53 }; | 53 }; |
54 | 54 |
55 class FakeSharedMemoryFactory : public SharedMemoryFactory { | 55 class FakeSharedMemoryFactory : public SharedMemoryFactory { |
56 public: | 56 public: |
57 FakeSharedMemoryFactory() {} | 57 FakeSharedMemoryFactory() {} |
58 ~FakeSharedMemoryFactory() override {} | 58 ~FakeSharedMemoryFactory() override {} |
59 | 59 |
60 rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override { | 60 rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override { |
61 return rtc_make_scoped_ptr(new FakeSharedMemory(new char[size], size)); | 61 return rtc::scoped_ptr<SharedMemory>( |
| 62 new FakeSharedMemory(new char[size], size)); |
62 } | 63 } |
63 | 64 |
64 private: | 65 private: |
65 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemoryFactory); | 66 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemoryFactory); |
66 }; | 67 }; |
67 | 68 |
68 TEST_F(ScreenCapturerTest, GetScreenListAndSelectScreen) { | 69 TEST_F(ScreenCapturerTest, GetScreenListAndSelectScreen) { |
69 webrtc::ScreenCapturer::ScreenList screens; | 70 webrtc::ScreenCapturer::ScreenList screens; |
70 EXPECT_TRUE(capturer_->GetScreenList(&screens)); | 71 EXPECT_TRUE(capturer_->GetScreenList(&screens)); |
71 for(webrtc::ScreenCapturer::ScreenList::iterator it = screens.begin(); | 72 for(webrtc::ScreenCapturer::ScreenList::iterator it = screens.begin(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 135 |
135 capturer_->Start(&callback_); | 136 capturer_->Start(&callback_); |
136 capturer_->Capture(DesktopRegion()); | 137 capturer_->Capture(DesktopRegion()); |
137 ASSERT_TRUE(frame); | 138 ASSERT_TRUE(frame); |
138 delete frame; | 139 delete frame; |
139 } | 140 } |
140 | 141 |
141 #endif // defined(WEBRTC_WIN) | 142 #endif // defined(WEBRTC_WIN) |
142 | 143 |
143 } // namespace webrtc | 144 } // namespace webrtc |
OLD | NEW |