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

Unified Diff: content/browser/media/capture/cursor_renderer_aura_unittest.cc

Issue 1760063004: Add a test case for cursor display on root window (screen share). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/cursor_renderer_aura_unittest.cc
diff --git a/content/browser/media/capture/cursor_renderer_aura_unittest.cc b/content/browser/media/capture/cursor_renderer_aura_unittest.cc
index bb210b9737e02aaa247ebc1ed81d3e2d583a9db0..e521236d50cd3019b47d93593c85f29a3cc237da 100644
--- a/content/browser/media/capture/cursor_renderer_aura_unittest.cc
+++ b/content/browser/media/capture/cursor_renderer_aura_unittest.cc
@@ -200,4 +200,20 @@ TEST_F(CursorRendererAuraTest, CursorRenderedOnFrame) {
EXPECT_TRUE(NonZeroPixelsInRegion(frame, gfx::Rect(50, 50, 70, 70)));
}
+TEST_F(CursorRendererAuraTest, CursorRenderedOnRootWindow) {
+ cursor_renderer_.reset(new CursorRendererAura(root_window()));
+ EXPECT_FALSE(CursorDisplayed());
+
+ // Cursor displayed after mouse movement.
+ MoveMouseCursorWithinWindow();
+ EXPECT_TRUE(CursorDisplayed());
+
+ // Cursor being displayed even if another window is activated.
+ scoped_ptr<aura::Window> window2(aura::test::CreateTestWindowWithBounds(
+ gfx::Rect(0, 0, 800, 600), root_window()));
+ wm::ActivateWindow(window2.get());
+ SnapshotCursorState(gfx::Rect(0, 0, 800, 600));
+ EXPECT_TRUE(CursorDisplayed());
+}
+
} // namespace content
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698