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

Side by Side Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2897663002: chromeos: makes it possible for windows to outlive WindowTreeClient (Closed)
Patch Set: cleanup Created 3 years, 7 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 | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/aura_test_base.h » ('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 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
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
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/aura_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698