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

Side by Side Diff: ash/shelf/shelf_view_unittest.cc

Issue 1851883002: Cleanup shelf initialization and observation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for shelf before setting prefs in ChromeLauncherController. Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shelf/shelf_view.h" 5 #include "ash/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 TestShelfDelegateForShelfView() {} 243 TestShelfDelegateForShelfView() {}
244 ~TestShelfDelegateForShelfView() override {} 244 ~TestShelfDelegateForShelfView() override {}
245 245
246 void set_is_app_pinned(bool is_pinned) { is_app_pinned_ = is_pinned; } 246 void set_is_app_pinned(bool is_pinned) { is_app_pinned_ = is_pinned; }
247 247
248 // ShelfDelegate overrides: 248 // ShelfDelegate overrides:
249 void OnShelfCreated(Shelf* shelf) override {} 249 void OnShelfCreated(Shelf* shelf) override {}
250 250
251 void OnShelfDestroyed(Shelf* shelf) override {} 251 void OnShelfDestroyed(Shelf* shelf) override {}
252 252
253 void OnShelfAlignmentChanged(Shelf* shelf) override {}
254
255 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {}
256
253 ShelfID GetShelfIDForAppID(const std::string& app_id) override { 257 ShelfID GetShelfIDForAppID(const std::string& app_id) override {
254 ShelfID id = 0; 258 ShelfID id = 0;
255 EXPECT_TRUE(base::StringToInt(app_id, &id)); 259 EXPECT_TRUE(base::StringToInt(app_id, &id));
256 return id; 260 return id;
257 } 261 }
258 262
259 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return true; } 263 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return true; }
260 264
261 const std::string& GetAppIDForShelfID(ShelfID id) override { 265 const std::string& GetAppIDForShelfID(ShelfID id) override {
262 // Use |app_id_| member variable because returning a reference to local 266 // Use |app_id_| member variable because returning a reference to local
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 test_api_->RunMessageLoopUntilAnimationsDone(); 1948 test_api_->RunMessageLoopUntilAnimationsDone();
1945 CheckAllItemsAreInBounds(); 1949 CheckAllItemsAreInBounds();
1946 } 1950 }
1947 1951
1948 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); 1952 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool());
1949 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, 1953 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest,
1950 testing::Bool()); 1954 testing::Bool());
1951 1955
1952 } // namespace test 1956 } // namespace test
1953 } // namespace ash 1957 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698