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

Side by Side Diff: services/ui/ws/window_tree_unittest.cc

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 4 years, 5 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
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 const uint32_t kChangeId = 8; 1238 const uint32_t kChangeId = 8;
1239 const Id kInvalidWindowId = 1234567890; 1239 const Id kInvalidWindowId = 1234567890;
1240 static_cast<mojom::WindowTree*>(tree)->PerformWindowMove( 1240 static_cast<mojom::WindowTree*>(tree)->PerformWindowMove(
1241 kChangeId, kInvalidWindowId, mojom::MoveLoopSource::MOUSE, 1241 kChangeId, kInvalidWindowId, mojom::MoveLoopSource::MOUSE,
1242 gfx::Point(0, 0)); 1242 gfx::Point(0, 0));
1243 1243
1244 EXPECT_EQ("ChangeCompleted id=8 sucess=false", 1244 EXPECT_EQ("ChangeCompleted id=8 sucess=false",
1245 SingleChangeToDescription(*embed_client->tracker()->changes())); 1245 SingleChangeToDescription(*embed_client->tracker()->changes()));
1246 } 1246 }
1247 1247
1248 TEST_F(WindowTreeTest, SetCanAcceptEvents) {
1249 TestWindowTreeClient* embed_client = nullptr;
1250 WindowTree* tree = nullptr;
1251 ServerWindow* window = nullptr;
1252 EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
1253
1254 EXPECT_TRUE(window->can_accept_events());
1255 WindowTreeTestApi(tree).SetCanAcceptEvents(
1256 ClientWindowIdForWindow(tree, window).id, false);
1257 EXPECT_FALSE(window->can_accept_events());
1258 }
1259
1248 } // namespace test 1260 } // namespace test
1249 } // namespace ws 1261 } // namespace ws
1250 } // namespace ui 1262 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698