| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/custom_frame_view_ash.h" | 5 #include "ash/wm/custom_frame_view_ash.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/wm/maximize_bubble_controller.h" | 9 #include "ash/wm/maximize_bubble_controller.h" |
| 10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 virtual void SetUp() OVERRIDE { | 93 virtual void SetUp() OVERRIDE { |
| 94 AshTestBase::SetUp(); | 94 AshTestBase::SetUp(); |
| 95 if (!views::ViewsDelegate::views_delegate) { | 95 if (!views::ViewsDelegate::views_delegate) { |
| 96 views_delegate_.reset(new ShellViewsDelegate); | 96 views_delegate_.reset(new ShellViewsDelegate); |
| 97 views::ViewsDelegate::views_delegate = views_delegate_.get(); | 97 views::ViewsDelegate::views_delegate = views_delegate_.get(); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 virtual void TearDown() OVERRIDE { | 101 virtual void TearDown() OVERRIDE { |
| 102 if (views_delegate_.get()) { | 102 if (views_delegate_) { |
| 103 views::ViewsDelegate::views_delegate = NULL; | 103 views::ViewsDelegate::views_delegate = NULL; |
| 104 views_delegate_.reset(); | 104 views_delegate_.reset(); |
| 105 } | 105 } |
| 106 AshTestBase::TearDown(); | 106 AshTestBase::TearDown(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 scoped_ptr<views::ViewsDelegate> views_delegate_; | 110 scoped_ptr<views::ViewsDelegate> views_delegate_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAshTest); | 112 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAshTest); |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 button_pos = maximize_button->GetBoundsInScreen().CenterPoint(); | 797 button_pos = maximize_button->GetBoundsInScreen().CenterPoint(); |
| 798 off_pos = gfx::Point(button_pos.x(), button_pos.y() + 200); | 798 off_pos = gfx::Point(button_pos.x(), button_pos.y() + 200); |
| 799 generator.GestureScrollSequence(button_pos, off_pos, | 799 generator.GestureScrollSequence(button_pos, off_pos, |
| 800 base::TimeDelta::FromMilliseconds(10), 1); | 800 base::TimeDelta::FromMilliseconds(10), 1); |
| 801 EXPECT_TRUE(wm::IsWindowMinimized(window)); | 801 EXPECT_TRUE(wm::IsWindowMinimized(window)); |
| 802 EXPECT_FALSE(maximize_button->maximizer()); | 802 EXPECT_FALSE(maximize_button->maximizer()); |
| 803 } | 803 } |
| 804 | 804 |
| 805 } // namespace internal | 805 } // namespace internal |
| 806 } // namespace ash | 806 } // namespace ash |
| OLD | NEW |