| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 AppListViewTestContext* parent_; | 165 AppListViewTestContext* parent_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(UnitTestViewDelegate); | 167 DISALLOW_COPY_AND_ASSIGN(UnitTestViewDelegate); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 AppListViewTestContext::AppListViewTestContext(gfx::NativeView parent) { | 170 AppListViewTestContext::AppListViewTestContext(gfx::NativeView parent) { |
| 171 delegate_.reset(new UnitTestViewDelegate(this)); | 171 delegate_.reset(new UnitTestViewDelegate(this)); |
| 172 view_ = new app_list::AppListView(delegate_.get()); | 172 view_ = new app_list::AppListView(delegate_.get()); |
| 173 | 173 |
| 174 // Initialize centered around a point that ensures the window is wholly shown. | 174 // Initialize centered around a point that ensures the window is wholly shown. |
| 175 view_->InitAsBubble(parent, 0); | 175 view_->Initialize(parent, 0); |
| 176 view_->SetAnchorPoint(gfx::Point(300, 300)); | 176 view_->MaybeSetAnchorPoint(gfx::Point(300, 300)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 AppListViewTestContext::~AppListViewTestContext() { | 179 AppListViewTestContext::~AppListViewTestContext() { |
| 180 // The view observes the PaginationModel which is about to get destroyed, so | 180 // The view observes the PaginationModel which is about to get destroyed, so |
| 181 // if the view is not already deleted by the time this destructor is called, | 181 // if the view is not already deleted by the time this destructor is called, |
| 182 // there will be problems. | 182 // there will be problems. |
| 183 EXPECT_FALSE(view_); | 183 EXPECT_FALSE(view_); |
| 184 } | 184 } |
| 185 | 185 |
| 186 // static | 186 // static |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 TEST_F(AppListViewTestAura, AppListOverlayTest) { | 684 TEST_F(AppListViewTestAura, AppListOverlayTest) { |
| 685 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); | 685 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); |
| 686 } | 686 } |
| 687 | 687 |
| 688 TEST_F(AppListViewTestDesktop, AppListOverlayTest) { | 688 TEST_F(AppListViewTestDesktop, AppListOverlayTest) { |
| 689 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); | 689 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); |
| 690 } | 690 } |
| 691 | 691 |
| 692 } // namespace test | 692 } // namespace test |
| 693 } // namespace app_list | 693 } // namespace app_list |
| OLD | NEW |