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

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

Issue 10662032: alternate ntp (cros/partial-win): add tab-related stuff and toolbar/tab background change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed scott's comments Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/tabs/tab_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 (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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" 8 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h"
9 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" 9 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
10 #include "chrome/browser/ui/views/tabs/tab_strip.h" 10 #include "chrome/browser/ui/views/tabs/tab_strip.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 class TabStripTest : public testing::Test { 13 class TabStripTest : public testing::Test {
14 public: 14 public:
15 TabStripTest() 15 TabStripTest()
16 : controller_(new FakeBaseTabStripController), 16 : controller_(new FakeBaseTabStripController),
17 tab_strip_(new TabStrip(controller_)) { 17 tab_strip_(new TabStrip(controller_, false)) {
18 controller_->set_tab_strip(tab_strip_); 18 controller_->set_tab_strip(tab_strip_);
19 // Do this to force TabStrip to create the buttons. 19 // Do this to force TabStrip to create the buttons.
20 parent_.AddChildView(tab_strip_); 20 parent_.AddChildView(tab_strip_);
21 } 21 }
22 22
23 protected: 23 protected:
24 MessageLoopForUI ui_loop_; 24 MessageLoopForUI ui_loop_;
25 // Owned by TabStrip. 25 // Owned by TabStrip.
26 FakeBaseTabStripController* controller_; 26 FakeBaseTabStripController* controller_;
27 // Owns |tab_strip_|. 27 // Owns |tab_strip_|.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 tab_strip_->SetBounds(0, 0, 200, 20); 70 tab_strip_->SetBounds(0, 0, 200, 20);
71 // Layout at a different size should force the animation to end and delete 71 // Layout at a different size should force the animation to end and delete
72 // the tab that was removed. 72 // the tab that was removed.
73 tab_strip_->Layout(); 73 tab_strip_->Layout();
74 EXPECT_EQ(child_view_count - 1, tab_strip_->child_count()); 74 EXPECT_EQ(child_view_count - 1, tab_strip_->child_count());
75 75
76 // Remove the last tab to make sure things are cleaned up correctly when 76 // Remove the last tab to make sure things are cleaned up correctly when
77 // the TabStrip is destroyed and an animation is ongoing. 77 // the TabStrip is destroyed and an animation is ongoing.
78 controller_->RemoveTab(0); 78 controller_->RemoveTab(0);
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/tabs/tab_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698