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

Side by Side Diff: chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" 5 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // (tab_size(100) + padding (-10)). 127 // (tab_size(100) + padding (-10)).
128 for (int j = 1; j < view_model_.view_size(); ++j) 128 for (int j = 1; j < view_model_.view_size(); ++j)
129 EXPECT_LE(ideal_x(j) - ideal_x(j - 1), max_width - 100); 129 EXPECT_LE(ideal_x(j) - ideal_x(j - 1), max_width - 100);
130 } 130 }
131 131
132 int ideal_x(int index) const { 132 int ideal_x(int index) const {
133 return view_model_.ideal_bounds(index).x(); 133 return view_model_.ideal_bounds(index).x();
134 } 134 }
135 135
136 content::TestBrowserThreadBundle thread_bundle_; 136 content::TestBrowserThreadBundle thread_bundle_;
137 scoped_ptr<StackedTabStripLayout> layout_; 137 std::unique_ptr<StackedTabStripLayout> layout_;
138 views::ViewModel view_model_; 138 views::ViewModel view_model_;
139 139
140 private: 140 private:
141 views::View view_; 141 views::View view_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(StackedTabStripLayoutTest); 143 DISALLOW_COPY_AND_ASSIGN(StackedTabStripLayoutTest);
144 }; 144 };
145 145
146 // Random data. 146 // Random data.
147 TEST_F(StackedTabStripLayoutTest, ValidateInitialLayout) { 147 TEST_F(StackedTabStripLayoutTest, ValidateInitialLayout) {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Location can be honored. 557 // Location can be honored.
558 { { 0, 300, 100, 10, 2, 0, 3, "", "0 2 4 40 130 198 200" }, 40 }, 558 { { 0, 300, 100, 10, 2, 0, 3, "", "0 2 4 40 130 198 200" }, 40 },
559 }; 559 };
560 for (size_t i = 0; i < arraysize(test_data); ++i) { 560 for (size_t i = 0; i < arraysize(test_data); ++i) {
561 CreateLayout(test_data[i].common_data); 561 CreateLayout(test_data[i].common_data);
562 layout_->SetActiveTabLocation(test_data[i].location); 562 layout_->SetActiveTabLocation(test_data[i].location);
563 EXPECT_EQ(test_data[i].common_data.expected_bounds, BoundsString()) << 563 EXPECT_EQ(test_data[i].common_data.expected_bounds, BoundsString()) <<
564 " at " << i; 564 " at " << i;
565 } 565 }
566 } 566 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698