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

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

Issue 305013014: Disable folder UI when app sync is disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/apps_grid_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 "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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 main_view_ = new AppListMainView(delegate_.get(), 0, GetContext());
77 main_view_->SetPaintToLayer(true); 77 main_view_->SetPaintToLayer(true);
78 main_view_->model()->SetFoldersEnabled(true);
78 79
79 widget_ = new views::Widget; 80 widget_ = new views::Widget;
80 views::Widget::InitParams params = 81 views::Widget::InitParams params =
81 CreateParams(views::Widget::InitParams::TYPE_POPUP); 82 CreateParams(views::Widget::InitParams::TYPE_POPUP);
82 params.bounds.set_size(main_view_->GetPreferredSize()); 83 params.bounds.set_size(main_view_->GetPreferredSize());
83 widget_->Init(params); 84 widget_->Init(params);
84 85
85 widget_->SetContentsView(main_view_); 86 widget_->SetContentsView(main_view_);
86 } 87 }
87 88
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 root_grid_view_test_api.LayoutToIdealBounds(); 266 root_grid_view_test_api.LayoutToIdealBounds();
266 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds()); 267 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds());
267 268
268 // Single item folder should be auto removed. 269 // Single item folder should be auto removed.
269 EXPECT_EQ(NULL, 270 EXPECT_EQ(NULL,
270 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 271 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
271 } 272 }
272 273
273 } // namespace test 274 } // namespace test
274 } // namespace app_list 275 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698