| 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 "ash/common/shell_window_ids.h" | 5 #include "ash/common/shell_window_ids.h" |
| 6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "ui/aura/test/test_windows.h" | 8 #include "ui/aura/test/test_windows.h" |
| 9 #include "ui/aura/window_observer.h" | 9 #include "ui/aura/window_observer.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(WindowDeleter); | 28 DISALLOW_COPY_AND_ASSIGN(WindowDeleter); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 using RootWindowLayoutManagerTest = test::AshTestBase; | 33 using RootWindowLayoutManagerTest = test::AshTestBase; |
| 34 | 34 |
| 35 TEST_F(RootWindowLayoutManagerTest, DeleteChildDuringResize) { | 35 TEST_F(RootWindowLayoutManagerTest, DeleteChildDuringResize) { |
| 36 aura::Window* parent = Shell::GetPrimaryRootWindow()->GetChildById( | 36 aura::Window* parent = Shell::GetPrimaryRootWindow()->GetChildById( |
| 37 kShellWindowId_DesktopBackgroundContainer); | 37 kShellWindowId_WallpaperContainer); |
| 38 aura::Window* w1 = aura::test::CreateTestWindowWithId(1, parent); | 38 aura::Window* w1 = aura::test::CreateTestWindowWithId(1, parent); |
| 39 aura::Window* w2 = aura::test::CreateTestWindowWithId(2, parent); | 39 aura::Window* w2 = aura::test::CreateTestWindowWithId(2, parent); |
| 40 WindowDeleter deleter(w1); | 40 WindowDeleter deleter(w1); |
| 41 w2->AddObserver(&deleter); | 41 w2->AddObserver(&deleter); |
| 42 UpdateDisplay("600x500"); | 42 UpdateDisplay("600x500"); |
| 43 w2->RemoveObserver(&deleter); | 43 w2->RemoveObserver(&deleter); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace ash | 46 } // namespace ash |
| OLD | NEW |