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

Unified Diff: chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h

Issue 2700243002: [Mac] Test for Security State Bubble Decoration (Closed)
Patch Set: Nits Created 3 years, 10 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/cocoa/location_bar/security_state_bubble_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
index ebb37c546c9a350589e421c560634ca780bad72a..6a411e7d8a376c7ff3d8cdff811befe8739593ed 100644
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
@@ -19,6 +19,7 @@
// |location_icon| is used to fulfill drag-related calls.
class LocationBarViewMac;
+class LocationBarViewMacTest;
class LocationIconDecoration;
namespace {
@@ -39,12 +40,12 @@ class SecurityStateBubbleDecoration : public BubbleDecoration,
// Set the color of the label.
void SetLabelColor(SkColor color);
- // Methods that animate in and out the chip.
- void AnimateIn(bool image_fade = true);
- void AnimateOut();
+ // Methods that animate in and out the chip. Virtual for testing.
+ virtual void AnimateIn(bool image_fade = true);
+ virtual void AnimateOut();
- // Shows the chip without animation.
- void ShowWithoutAnimation();
+ // Shows the chip without animation. Virtual for testing.
+ virtual void ShowWithoutAnimation();
// Returns true if the chip has fully animated in.
bool HasAnimatedIn() const;
@@ -55,8 +56,8 @@ class SecurityStateBubbleDecoration : public BubbleDecoration,
// Returns true if the chip is in the process of animating out.
bool AnimatingOut() const;
- // Resets the animation.
- void ResetAnimation();
+ // Resets the animation. Virtual for testing.
+ virtual void ResetAnimation();
// LocationBarDecoration:
CGFloat GetWidthForSpace(CGFloat width) override;
@@ -81,6 +82,7 @@ class SecurityStateBubbleDecoration : public BubbleDecoration,
NSColor* GetDarkModeTextColor() override;
private:
+ friend class ::LocationBarViewMacTest;
friend class ::SecurityStateBubbleDecorationTest;
// Returns the animation progress. If not in MD, the animation progress

Powered by Google App Engine
This is Rietveld 408576698