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

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: . 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual ~AppListMainViewTest() {} 70 virtual ~AppListMainViewTest() {}
71 71
72 // testing::Test overrides: 72 // testing::Test overrides:
73 virtual void SetUp() OVERRIDE { 73 virtual void SetUp() OVERRIDE {
74 views::ViewsTestBase::SetUp(); 74 views::ViewsTestBase::SetUp();
75 delegate_.reset(new AppListTestViewDelegate); 75 delegate_.reset(new AppListTestViewDelegate);
76 76
77 main_view_ = 77 main_view_ =
78 new AppListMainView(delegate_.get(), &pagination_model_, GetContext()); 78 new AppListMainView(delegate_.get(), &pagination_model_, GetContext());
79 main_view_->SetPaintToLayer(true); 79 main_view_->SetPaintToLayer(true);
80 main_view_->model()->SetFoldersEnabled(true);
80 81
81 widget_ = new views::Widget; 82 widget_ = new views::Widget;
82 views::Widget::InitParams params = 83 views::Widget::InitParams params =
83 CreateParams(views::Widget::InitParams::TYPE_POPUP); 84 CreateParams(views::Widget::InitParams::TYPE_POPUP);
84 params.bounds.set_size(main_view_->GetPreferredSize()); 85 params.bounds.set_size(main_view_->GetPreferredSize());
85 widget_->Init(params); 86 widget_->Init(params);
86 87
87 widget_->SetContentsView(main_view_); 88 widget_->SetContentsView(main_view_);
88 } 89 }
89 90
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 root_grid_view_test_api.LayoutToIdealBounds(); 269 root_grid_view_test_api.LayoutToIdealBounds();
269 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds()); 270 EXPECT_EQ(first_slot_tile, RootViewModel()->view_at(0)->bounds());
270 271
271 // Single item folder should be auto removed. 272 // Single item folder should be auto removed.
272 EXPECT_EQ(NULL, 273 EXPECT_EQ(NULL,
273 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 274 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
274 } 275 }
275 276
276 } // namespace test 277 } // namespace test
277 } // namespace app_list 278 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698