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

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

Issue 2084583004: Fix tab coloring bugs with multiple open profiles which used different colors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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') | no next file » | 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.h" 5 #include "chrome/browser/ui/views/tabs/tab.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool EndDrag(EndDragReason reason) override { return false; } 60 bool EndDrag(EndDragReason reason) override { return false; }
61 Tab* GetTabAt(Tab* tab, const gfx::Point& tab_in_tab_coordinates) override { 61 Tab* GetTabAt(Tab* tab, const gfx::Point& tab_in_tab_coordinates) override {
62 return NULL; 62 return NULL;
63 } 63 }
64 void OnMouseEventInTab(views::View* source, 64 void OnMouseEventInTab(views::View* source,
65 const ui::MouseEvent& event) override {} 65 const ui::MouseEvent& event) override {}
66 bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) override { return true; } 66 bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) override { return true; }
67 bool CanPaintThrobberToLayer() const override { 67 bool CanPaintThrobberToLayer() const override {
68 return paint_throbber_to_layer_; 68 return paint_throbber_to_layer_;
69 } 69 }
70 bool IsIncognito() const override { return false; }
71 bool IsImmersiveStyle() const override { return immersive_style_; } 70 bool IsImmersiveStyle() const override { return immersive_style_; }
72 SkColor GetToolbarTopSeparatorColor() const override { return SK_ColorBLACK; } 71 SkColor GetToolbarTopSeparatorColor() const override { return SK_ColorBLACK; }
73 int GetBackgroundResourceId(bool* custom_image) const override { 72 int GetBackgroundResourceId(bool* custom_image) const override {
74 *custom_image = false; 73 *custom_image = false;
75 return IDR_THEME_TAB_BACKGROUND; 74 return IDR_THEME_TAB_BACKGROUND;
76 } 75 }
77 void UpdateTabAccessibilityState(const Tab* tab, 76 void UpdateTabAccessibilityState(const Tab* tab,
78 ui::AXViewState* state) override{}; 77 ui::AXViewState* state) override{};
79 78
80 private: 79 private:
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 484 }
486 485
487 TEST_F(TabTest, TitleHiddenWhenSmall) { 486 TEST_F(TabTest, TitleHiddenWhenSmall) {
488 FakeTabController tab_controller; 487 FakeTabController tab_controller;
489 Tab tab(&tab_controller, nullptr); 488 Tab tab(&tab_controller, nullptr);
490 tab.SetBounds(0, 0, 100, 50); 489 tab.SetBounds(0, 0, 100, 50);
491 EXPECT_GT(GetTitleWidth(tab), 0); 490 EXPECT_GT(GetTitleWidth(tab), 0);
492 tab.SetBounds(0, 0, 0, 50); 491 tab.SetBounds(0, 0, 0, 50);
493 EXPECT_EQ(0, GetTitleWidth(tab)); 492 EXPECT_EQ(0, GetTitleWidth(tab));
494 } 493 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698