| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // fails. | 183 // fails. |
| 184 TEST_F(DesktopAndCursorComposerTest, Error) { | 184 TEST_F(DesktopAndCursorComposerTest, Error) { |
| 185 blender_.Start(this); | 185 blender_.Start(this); |
| 186 | 186 |
| 187 fake_cursor_->SetHotspot(DesktopVector()); | 187 fake_cursor_->SetHotspot(DesktopVector()); |
| 188 fake_cursor_->SetState(MouseCursorMonitor::INSIDE, DesktopVector()); | 188 fake_cursor_->SetState(MouseCursorMonitor::INSIDE, DesktopVector()); |
| 189 fake_screen_->SetNextFrame(NULL); | 189 fake_screen_->SetNextFrame(NULL); |
| 190 | 190 |
| 191 blender_.Capture(DesktopRegion()); | 191 blender_.Capture(DesktopRegion()); |
| 192 | 192 |
| 193 EXPECT_EQ(frame_, static_cast<DesktopFrame*>(NULL)); | 193 EXPECT_EQ(frame_.get(), static_cast<DesktopFrame*>(NULL)); |
| 194 } | 194 } |
| 195 | 195 |
| 196 TEST_F(DesktopAndCursorComposerTest, Blend) { | 196 TEST_F(DesktopAndCursorComposerTest, Blend) { |
| 197 struct { | 197 struct { |
| 198 int x, y; | 198 int x, y; |
| 199 int hotspot_x, hotspot_y; | 199 int hotspot_x, hotspot_y; |
| 200 bool inside; | 200 bool inside; |
| 201 } tests[] = { | 201 } tests[] = { |
| 202 {0, 0, 0, 0, true}, | 202 {0, 0, 0, 0, true}, |
| 203 {50, 50, 0, 0, true}, | 203 {50, 50, 0, 0, true}, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Verify that the cursor is erased before the frame buffer is returned to | 239 // Verify that the cursor is erased before the frame buffer is returned to |
| 240 // the screen capturer. | 240 // the screen capturer. |
| 241 frame_.reset(); | 241 frame_.reset(); |
| 242 VerifyFrame(*frame, MouseCursorMonitor::OUTSIDE, DesktopVector()); | 242 VerifyFrame(*frame, MouseCursorMonitor::OUTSIDE, DesktopVector()); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 } // namespace | 246 } // namespace |
| 247 | 247 |
| 248 } // namespace webrtc | 248 } // namespace webrtc |
| OLD | NEW |