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

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: Address Original Review Comments 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 5b706582457a70c1a15678e5e5644bd7acf08163..4b4e998ac8978da5b7e67cfb4f570190e3696735 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