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

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: Early return 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
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_EQ(true, window->can_accept_events());
msw 2016/07/12 22:07:23 nit: EXPECT_TRUE
riajiang 2016/07/13 00:01:46 Done.
1255 tree->SetCanAcceptEvents(ClientWindowIdForWindow(tree, window).id, false);
1256 EXPECT_EQ(false, window->can_accept_events());
msw 2016/07/12 22:07:23 nit: EXPECT_FALSE
riajiang 2016/07/13 00:01:46 Done.
1257 }
1258
1248 } // namespace test 1259 } // namespace test
1249 } // namespace ws 1260 } // namespace ws
1250 } // namespace ui 1261 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698