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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 14305004: Simplify ScreenCapturer interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment_unittest.cc
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index ec6c257e77c711a188ef76499b0cac8f0dabb084..734078b92857cc50634a32475320b04c921a5c24 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -495,58 +495,6 @@ TEST_F(IpcDesktopEnvironmentTest, Reattach) {
main_run_loop_.Run();
}
-// Tests InvalidateRegion().
-TEST_F(IpcDesktopEnvironmentTest, InvalidateRegion) {
- scoped_ptr<protocol::MockClipboardStub> clipboard_stub(
- new protocol::MockClipboardStub());
- EXPECT_CALL(*clipboard_stub, InjectClipboardEvent(_))
- .Times(0);
-
- // Start the input injector and screen capturer.
- input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_delegate_);
-
- // Run the message loop until the desktop is attached.
- setup_run_loop_->Run();
-
- // Input injector should receive no events.
- EXPECT_CALL(*remote_input_injector_, InjectClipboardEvent(_))
- .Times(0);
- EXPECT_CALL(*remote_input_injector_, InjectKeyEvent(_))
- .Times(0);
- EXPECT_CALL(*remote_input_injector_, InjectMouseEvent(_))
- .Times(0);
-
- // Stop the test when the first frame is captured.
- EXPECT_CALL(screen_capturer_delegate_, OnCaptureCompleted(_))
- .WillOnce(InvokeWithoutArgs(
- this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment));
-
- // Invalidate a region that is larger than the screen.
- SkIRect horizontal_rect = SkIRect::MakeXYWH(
- -100,
- media::ScreenCapturerFake::kHeight / 4,
- media::ScreenCapturerFake::kWidth + 200,
- media::ScreenCapturerFake::kHeight / 2);
- SkIRect vertical_rect = SkIRect::MakeXYWH(
- media::ScreenCapturerFake::kWidth / 4,
- -100,
- media::ScreenCapturerFake::kWidth / 2,
- media::ScreenCapturerFake::kHeight + 200);
-
- SkRegion invalid_region;
- invalid_region.op(horizontal_rect, SkRegion::kUnion_Op);
- invalid_region.op(vertical_rect, SkRegion::kUnion_Op);
- video_capturer_->InvalidateRegion(invalid_region);
-
- // Capture a single frame.
- video_capturer_->CaptureFrame();
-
- task_runner_ = NULL;
- io_task_runner_ = NULL;
- main_run_loop_.Run();
-}
-
// Tests injection of clipboard events.
TEST_F(IpcDesktopEnvironmentTest, InjectClipboardEvent) {
scoped_ptr<protocol::MockClipboardStub> clipboard_stub(
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698