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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 cursor_image_->image()->size().height()); | 80 cursor_image_->image()->size().height()); |
81 | 81 |
82 EXPECT_TRUE(position_received_); | 82 EXPECT_TRUE(position_received_); |
83 EXPECT_EQ(MouseCursorMonitor::INSIDE, state_); | 83 EXPECT_EQ(MouseCursorMonitor::INSIDE, state_); |
84 } | 84 } |
85 | 85 |
86 TEST_F(MouseCursorMonitorTest, MAYBE(FromWindow)) { | 86 TEST_F(MouseCursorMonitorTest, MAYBE(FromWindow)) { |
87 DesktopCaptureOptions options = DesktopCaptureOptions::CreateDefault(); | 87 DesktopCaptureOptions options = DesktopCaptureOptions::CreateDefault(); |
88 | 88 |
89 // First get list of windows. | 89 // First get list of windows. |
90 std::unique_ptr<WindowCapturer> window_capturer( | 90 std::unique_ptr<DesktopCapturer> window_capturer( |
91 WindowCapturer::Create(options)); | 91 DesktopCapturer::CreateWindowCapturer(options)); |
92 | 92 |
93 // If window capturing is not supported then skip this test. | 93 // If window capturing is not supported then skip this test. |
94 if (!window_capturer.get()) | 94 if (!window_capturer.get()) |
95 return; | 95 return; |
96 | 96 |
97 DesktopCapturer::SourceList sources; | 97 DesktopCapturer::SourceList sources; |
98 EXPECT_TRUE(window_capturer->GetSourceList(&sources)); | 98 EXPECT_TRUE(window_capturer->GetSourceList(&sources)); |
99 | 99 |
100 // Iterate over all windows and try capturing mouse cursor for each of them. | 100 // Iterate over all windows and try capturing mouse cursor for each of them. |
101 for (size_t i = 0; i < sources.size(); ++i) { | 101 for (size_t i = 0; i < sources.size(); ++i) { |
(...skipping 21 matching lines...) Expand all Loading... |
123 webrtc::kFullDesktopScreenId)); | 123 webrtc::kFullDesktopScreenId)); |
124 assert(capturer.get()); | 124 assert(capturer.get()); |
125 capturer->Init(this, MouseCursorMonitor::SHAPE_ONLY); | 125 capturer->Init(this, MouseCursorMonitor::SHAPE_ONLY); |
126 capturer->Capture(); | 126 capturer->Capture(); |
127 | 127 |
128 EXPECT_TRUE(cursor_image_.get()); | 128 EXPECT_TRUE(cursor_image_.get()); |
129 EXPECT_FALSE(position_received_); | 129 EXPECT_FALSE(position_received_); |
130 } | 130 } |
131 | 131 |
132 } // namespace webrtc | 132 } // namespace webrtc |
OLD | NEW |