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

Side by Side Diff: ui/app_list/views/app_list_main_view_unittest.cc

Issue 2934673002: Revert of Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Created 3 years, 6 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/app_list/views/app_list_main_view.cc ('k') | ui/app_list/views/app_list_view.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 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 "ui/app_list/views/app_list_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 search_box_widget_(nullptr), 75 search_box_widget_(nullptr),
76 search_box_view_(nullptr) {} 76 search_box_view_(nullptr) {}
77 77
78 ~AppListMainViewTest() override {} 78 ~AppListMainViewTest() override {}
79 79
80 // testing::Test overrides: 80 // testing::Test overrides:
81 void SetUp() override { 81 void SetUp() override {
82 views::ViewsTestBase::SetUp(); 82 views::ViewsTestBase::SetUp();
83 delegate_.reset(new AppListTestViewDelegate); 83 delegate_.reset(new AppListTestViewDelegate);
84 84
85 main_view_ = new AppListMainView(delegate_.get(), nullptr); 85 // In Ash, the third argument is a container aura::Window, but it is always
86 // NULL on Windows, and not needed for tests. It is only used to determine
87 // the scale factor for preloading icons.
88 main_view_ = new AppListMainView(delegate_.get());
86 main_view_->SetPaintToLayer(); 89 main_view_->SetPaintToLayer();
87 main_view_->model()->SetFoldersEnabled(true); 90 main_view_->model()->SetFoldersEnabled(true);
88 search_box_view_ = new SearchBoxView(main_view_, delegate_.get()); 91 search_box_view_ = new SearchBoxView(main_view_, delegate_.get());
89 main_view_->Init(nullptr, 0, search_box_view_); 92 main_view_->Init(nullptr, 0, search_box_view_);
90 93
91 main_widget_ = new views::Widget; 94 main_widget_ = new views::Widget;
92 views::Widget::InitParams main_widget_params = 95 views::Widget::InitParams main_widget_params =
93 CreateParams(views::Widget::InitParams::TYPE_POPUP); 96 CreateParams(views::Widget::InitParams::TYPE_POPUP);
94 main_widget_params.bounds.set_size(main_view_->GetPreferredSize()); 97 main_widget_params.bounds.set_size(main_view_->GetPreferredSize());
95 main_widget_->Init(main_widget_params); 98 main_widget_->Init(main_widget_params);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // The app list model should remain unchanged. 442 // The app list model should remain unchanged.
440 EXPECT_EQ(1, FolderViewModel()->view_size()); 443 EXPECT_EQ(1, FolderViewModel()->view_size());
441 EXPECT_EQ(2, RootViewModel()->view_size()); 444 EXPECT_EQ(2, RootViewModel()->view_size());
442 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id()); 445 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id());
443 EXPECT_NE(nullptr, 446 EXPECT_NE(nullptr,
444 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 447 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
445 } 448 }
446 449
447 } // namespace test 450 } // namespace test
448 } // namespace app_list 451 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_view.cc ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698