OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2398 EXPECT_EQ(ui::mojom::EventResult::HANDLED, | 2398 EXPECT_EQ(ui::mojom::EventResult::HANDLED, |
2399 window_tree()->GetEventResult(event_id)); | 2399 window_tree()->GetEventResult(event_id)); |
2400 EXPECT_TRUE(window_delegate1.got_move()); | 2400 EXPECT_TRUE(window_delegate1.got_move()); |
2401 EXPECT_FALSE(window_delegate2.got_move()); | 2401 EXPECT_FALSE(window_delegate2.got_move()); |
2402 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, | 2402 gfx::Point transformed_event_location_in_dip(event_location_in_dip.x() + 20, |
2403 event_location_in_dip.y() + 30); | 2403 event_location_in_dip.y() + 30); |
2404 EXPECT_EQ(transformed_event_location_in_dip, | 2404 EXPECT_EQ(transformed_event_location_in_dip, |
2405 window_delegate1.last_event_location()); | 2405 window_delegate1.last_event_location()); |
2406 } | 2406 } |
2407 | 2407 |
| 2408 using WindowTreeClientDestructionTest = test::AuraTestBaseMus; |
| 2409 |
| 2410 TEST_F(WindowTreeClientDestructionTest, Shutdown) { |
| 2411 // Windows should be able to outlive the WindowTreeClient. |
| 2412 aura::Window window(nullptr); |
| 2413 window.Init(ui::LAYER_NOT_DRAWN); |
| 2414 DeleteWindowTreeClient(); |
| 2415 |
| 2416 // And it should be possible to create Windows after the WindowTreeClient has |
| 2417 // been deleted. |
| 2418 aura::Window window2(nullptr); |
| 2419 window2.Init(ui::LAYER_NOT_DRAWN); |
| 2420 } |
| 2421 |
2408 } // namespace aura | 2422 } // namespace aura |
OLD | NEW |