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

Side by Side 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: Create InFlightCaptureChange add tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 scoped_ptr<TestWindow> parent(CreateTestWindow(0, nullptr)); 1125 scoped_ptr<TestWindow> parent(CreateTestWindow(0, nullptr));
1126 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get())); 1126 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get()));
1127 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get())); 1127 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get()));
1128 1128
1129 TestWindow* window2 = CreateTestWindow(3, parent.get()); 1129 TestWindow* window2 = CreateTestWindow(3, parent.get());
1130 1130
1131 window0->AddTransientWindow(window2); 1131 window0->AddTransientWindow(window2);
1132 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get())); 1132 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get()));
1133 } 1133 }
1134 1134
1135 // Tests that a window does not have capture until it is explicitly set.
1136 TEST_F(WindowTest, SetCapture) {
1137 TestWindow w;
1138 ASSERT_FALSE(w.has_capture());
1139 w.SetCapture();
1140 EXPECT_TRUE(w.has_capture());
1141 w.ReleaseCapture();
1142 EXPECT_FALSE(w.has_capture());
1143 }
1144
1135 } // namespace mus 1145 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698