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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_navigator_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 "ash/shelf/shelf_model.h" 5 #include "ash/shelf/shelf_model.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 EXPECT_EQ(1, model_->item_count()); 84 EXPECT_EQ(1, model_->item_count());
85 85
86 model_->AddObserver(observer_.get()); 86 model_->AddObserver(observer_.get());
87 } 87 }
88 88
89 void TearDown() override { 89 void TearDown() override {
90 observer_.reset(); 90 observer_.reset();
91 model_.reset(); 91 model_.reset();
92 } 92 }
93 93
94 scoped_ptr<ShelfModel> model_; 94 std::unique_ptr<ShelfModel> model_;
95 scoped_ptr<TestShelfModelObserver> observer_; 95 std::unique_ptr<TestShelfModelObserver> observer_;
96 96
97 private: 97 private:
98 DISALLOW_COPY_AND_ASSIGN(ShelfModelTest); 98 DISALLOW_COPY_AND_ASSIGN(ShelfModelTest);
99 }; 99 };
100 100
101 TEST_F(ShelfModelTest, BasicAssertions) { 101 TEST_F(ShelfModelTest, BasicAssertions) {
102 // Add an item. 102 // Add an item.
103 ShelfItem item; 103 ShelfItem item;
104 item.type = TYPE_APP_SHORTCUT; 104 item.type = TYPE_APP_SHORTCUT;
105 int index = model_->Add(item); 105 int index = model_->Add(item);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // Now change the type of the second item and make sure that it is moving 342 // Now change the type of the second item and make sure that it is moving
343 // behind the shortcuts. 343 // behind the shortcuts.
344 item.type = TYPE_PLATFORM_APP; 344 item.type = TYPE_PLATFORM_APP;
345 model_->Set(app2_index, item); 345 model_->Set(app2_index, item);
346 346
347 // The item should have moved in front of the app launcher. 347 // The item should have moved in front of the app launcher.
348 EXPECT_EQ(TYPE_PLATFORM_APP, model_->items()[4].type); 348 EXPECT_EQ(TYPE_PLATFORM_APP, model_->items()[4].type);
349 } 349 }
350 350
351 } // namespace ash 351 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_navigator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698