| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "ash/test/ash_test_base.h" | 6 #include "ash/test/ash_test_base.h" |
| 7 #include "ash/test/test_shelf_delegate.h" | 7 #include "ash/test/test_shelf_delegate.h" |
| 8 #include "ash/wm/mru_window_tracker.h" | 8 #include "ash/wm/mru_window_tracker.h" |
| 9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "ui/aura/test/test_window_delegate.h" | 12 #include "ui/aura/test/test_window_delegate.h" |
| 13 #include "ui/aura/window.h" | 13 #include "ui/aura/window.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 | 17 |
| 18 class MruWindowTrackerTest : public test::AshTestBase { | 18 class MruWindowTrackerTest : public test::AshTestBase { |
| 19 public: | 19 public: |
| 20 MruWindowTrackerTest() {} | 20 MruWindowTrackerTest() {} |
| 21 virtual ~MruWindowTrackerTest() {} | 21 ~MruWindowTrackerTest() override {} |
| 22 | 22 |
| 23 aura::Window* CreateWindow() { | 23 aura::Window* CreateWindow() { |
| 24 return CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 400, 400)); | 24 return CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 400, 400)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 ash::MruWindowTracker* mru_window_tracker() { | 27 ash::MruWindowTracker* mru_window_tracker() { |
| 28 return Shell::GetInstance()->mru_window_tracker(); | 28 return Shell::GetInstance()->mru_window_tracker(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 private: | 31 private: |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 mru_window_tracker()->BuildMruWindowList(); | 74 mru_window_tracker()->BuildMruWindowList(); |
| 75 EXPECT_EQ(w2.get(), window_list[0]); | 75 EXPECT_EQ(w2.get(), window_list[0]); |
| 76 EXPECT_EQ(w3.get(), window_list[1]); | 76 EXPECT_EQ(w3.get(), window_list[1]); |
| 77 EXPECT_EQ(w6.get(), window_list[2]); | 77 EXPECT_EQ(w6.get(), window_list[2]); |
| 78 EXPECT_EQ(w1.get(), window_list[3]); | 78 EXPECT_EQ(w1.get(), window_list[3]); |
| 79 EXPECT_EQ(w4.get(), window_list[4]); | 79 EXPECT_EQ(w4.get(), window_list[4]); |
| 80 EXPECT_EQ(w5.get(), window_list[5]); | 80 EXPECT_EQ(w5.get(), window_list[5]); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace ash | 83 } // namespace ash |
| OLD | NEW |