| OLD | NEW |
| 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 Loading... |
| 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()); |
| 1255 tree->SetCanAcceptEvents(ClientWindowIdForWindow(tree, window).id, false); |
| 1256 EXPECT_EQ(false, window->can_accept_events()); |
| 1257 } |
| 1258 |
| 1248 } // namespace test | 1259 } // namespace test |
| 1249 } // namespace ws | 1260 } // namespace ws |
| 1250 } // namespace ui | 1261 } // namespace ui |
| OLD | NEW |