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

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

Issue 438533002: MacViews: Changes to allow app_list_unittests to compile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Ash Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/app_list/views/app_list_view_unittest.cc » ('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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : widget_(NULL), 66 : widget_(NULL),
67 main_view_(NULL) {} 67 main_view_(NULL) {}
68 68
69 virtual ~AppListMainViewTest() {} 69 virtual ~AppListMainViewTest() {}
70 70
71 // testing::Test overrides: 71 // testing::Test overrides:
72 virtual void SetUp() OVERRIDE { 72 virtual void SetUp() OVERRIDE {
73 views::ViewsTestBase::SetUp(); 73 views::ViewsTestBase::SetUp();
74 delegate_.reset(new AppListTestViewDelegate); 74 delegate_.reset(new AppListTestViewDelegate);
75 75
76 main_view_ = new AppListMainView(delegate_.get(), 0, GetContext()); 76 // In Ash, the third argument is a container aura::Window, but it is always
77 // NULL on Windows, and not needed for tests. It is only used to determine
78 // the scale factor for preloading icons.
79 main_view_ = new AppListMainView(delegate_.get(), 0, NULL);
77 main_view_->SetPaintToLayer(true); 80 main_view_->SetPaintToLayer(true);
78 main_view_->model()->SetFoldersEnabled(true); 81 main_view_->model()->SetFoldersEnabled(true);
79 82
80 widget_ = new views::Widget; 83 widget_ = new views::Widget;
81 views::Widget::InitParams params = 84 views::Widget::InitParams params =
82 CreateParams(views::Widget::InitParams::TYPE_POPUP); 85 CreateParams(views::Widget::InitParams::TYPE_POPUP);
83 params.bounds.set_size(main_view_->GetPreferredSize()); 86 params.bounds.set_size(main_view_->GetPreferredSize());
84 widget_->Init(params); 87 widget_->Init(params);
85 88
86 widget_->SetContentsView(main_view_); 89 widget_->SetContentsView(main_view_);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 root_grid_view_test_api.LayoutToIdealBounds(); 269 root_grid_view_test_api.LayoutToIdealBounds();
267 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds()); 270 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds());
268 271
269 // Single item folder should be auto removed. 272 // Single item folder should be auto removed.
270 EXPECT_EQ(NULL, 273 EXPECT_EQ(NULL,
271 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 274 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
272 } 275 }
273 276
274 } // namespace test 277 } // namespace test
275 } // namespace app_list 278 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698