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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc

Issue 2348853004: Remove non-md code in location bar (Views). (Closed)
Patch Set: resolve change collision Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
index 8f60ba4365bde7227049669ffd0cb10cc64e30ae..f0a25531a52b3a932a15c9fb84e84cc6b8e5d6ed 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/layout_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/test/views_test_base.h"
@@ -26,8 +27,8 @@ class TestIconLabelBubbleView : public IconLabelBubbleView {
SHRINKING,
};
- TestIconLabelBubbleView(const gfx::FontList& font_list, SkColor color)
- : IconLabelBubbleView(0, font_list, color, false), value_(0) {
+ explicit TestIconLabelBubbleView(const gfx::FontList& font_list)
+ : IconLabelBubbleView(font_list, false), value_(0) {
GetImageView()->SetImageSize(gfx::Size(kImageSize, kImageSize));
SetLabel(base::ASCIIToUTF16("Label"));
}
@@ -56,11 +57,11 @@ class TestIconLabelBubbleView : public IconLabelBubbleView {
protected:
// IconLabelBubbleView:
SkColor GetTextColor() const override { return kTestColor; }
- SkColor GetBorderColor() const override { return kTestColor; }
- bool ShouldShowBackground() const override {
+ bool ShouldShowLabel() const override {
return !IsShrinking() ||
- (width() >= MinimumWidthForImageWithBackgroundShown());
+ (width() > (image()->GetPreferredSize().width() +
+ 2 * GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING)));
}
double WidthMultiplier() const override {
@@ -104,7 +105,7 @@ class IconLabelBubbleViewTest : public views::ViewsTestBase {
void SetUp() override {
views::ViewsTestBase::SetUp();
gfx::FontList font_list;
- view_.reset(new TestIconLabelBubbleView(font_list, kTestColor));
+ view_.reset(new TestIconLabelBubbleView(font_list));
}
void VerifyWithAnimationStep(int step) {

Powered by Google App Engine
This is Rietveld 408576698