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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip_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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/task_manager_view.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 (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/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" 9 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h"
10 #include "chrome/browser/ui/views/tabs/tab.h" 10 #include "chrome/browser/ui/views/tabs/tab.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return tab->HitTestPoint(point_in_tab_coords); 161 return tab->HitTestPoint(point_in_tab_coords);
162 } 162 }
163 163
164 void DoLayout() { tab_strip_->DoLayout(); } 164 void DoLayout() { tab_strip_->DoLayout(); }
165 165
166 // Owned by TabStrip. 166 // Owned by TabStrip.
167 FakeBaseTabStripController* controller_; 167 FakeBaseTabStripController* controller_;
168 // Owns |tab_strip_|. 168 // Owns |tab_strip_|.
169 views::View parent_; 169 views::View parent_;
170 TabStrip* tab_strip_; 170 TabStrip* tab_strip_;
171 scoped_ptr<views::Widget> widget_; 171 std::unique_ptr<views::Widget> widget_;
172 172
173 private: 173 private:
174 DISALLOW_COPY_AND_ASSIGN(TabStripTest); 174 DISALLOW_COPY_AND_ASSIGN(TabStripTest);
175 }; 175 };
176 176
177 TEST_F(TabStripTest, GetModelCount) { 177 TEST_F(TabStripTest, GetModelCount) {
178 EXPECT_EQ(0, tab_strip_->GetModelCount()); 178 EXPECT_EQ(0, tab_strip_->GetModelCount());
179 } 179 }
180 180
181 TEST_F(TabStripTest, IsValidModelIndex) { 181 TEST_F(TabStripTest, IsValidModelIndex) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 const int kTabStripWidth = 500; 628 const int kTabStripWidth = 500;
629 tab_strip_->SetBounds(0, 0, kTabStripWidth, 20); 629 tab_strip_->SetBounds(0, 0, kTabStripWidth, 20);
630 630
631 for (int i = 0; i < 100; ++i) 631 for (int i = 0; i < 100; ++i)
632 controller_->AddTab(i, (i == 0)); 632 controller_->AddTab(i, (i == 0));
633 633
634 DoLayout(); 634 DoLayout();
635 635
636 EXPECT_LE(tab_strip_->GetNewTabButtonBounds().right(), kTabStripWidth); 636 EXPECT_LE(tab_strip_->GetNewTabButtonBounds().right(), kTabStripWidth);
637 } 637 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698