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

Unified Diff: components/mus/public/cpp/tests/window_unittest.cc

Issue 1605773004: mus: Implement Window Server Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: components/mus/public/cpp/tests/window_unittest.cc
diff --git a/components/mus/public/cpp/tests/window_unittest.cc b/components/mus/public/cpp/tests/window_unittest.cc
index 09172c677cbf759532b53c958be197cccd604e05..b2283512004584b46d84a774b09e805ba914b8a4 100644
--- a/components/mus/public/cpp/tests/window_unittest.cc
+++ b/components/mus/public/cpp/tests/window_unittest.cc
@@ -1132,4 +1132,14 @@ TEST_F(WindowTest, StackUponCreation) {
EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get()));
}
+// Tests that a window does not have capture until it is explicitly set.
+TEST_F(WindowTest, SetCapture) {
+ TestWindow w;
+ ASSERT_FALSE(w.has_capture());
+ w.SetCapture();
+ EXPECT_TRUE(w.has_capture());
+ w.ReleaseCapture();
+ EXPECT_FALSE(w.has_capture());
+}
+
} // namespace mus

Powered by Google App Engine
This is Rietveld 408576698