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

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: Fix for rsesek 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
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac_unittest.mm ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..052d0399d2aa89c5ced139b46187263e01415767 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
@@ -25,6 +25,10 @@ namespace {
class SecurityStateBubbleDecorationTest;
}
+namespace {
+class LocationBarViewMacTest;
+}
+
class SecurityStateBubbleDecoration : public BubbleDecoration,
public gfx::AnimationDelegate {
public:
@@ -39,12 +43,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 +59,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 +85,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
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac_unittest.mm ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698