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

Unified Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm

Issue 2262913002: fix TranslateBubble toggle off by omnibar icon Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 4 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/browser_window_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm
index 937bf91d3307e288a6badcc32fa60cc5f9c70601..dd7a03812ce565ed3e0589432e9397f606ff40c7 100644
--- a/chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/translate/translate_bubble_controller_unittest.mm
@@ -162,28 +162,29 @@ TEST_F(TranslateBubbleControllerTest, SwitchViews) {
EXPECT_FALSE(bubble());
}
-TEST_F(TranslateBubbleControllerTest, CloseRegistersDecline) {
+TEST_F(TranslateBubbleControllerTest, CloseRegistersDecline1) {
const char kDeclineTranslateDismissUI[] =
"Translate.DeclineTranslateDismissUI";
const char kDeclineTranslate[] = "Translate.DeclineTranslate";
// A simple close without any interactions registers as a dismissal.
- {
- base::HistogramTester histogram_tester;
- ShowBubble();
- CloseBubble();
- histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 1);
- histogram_tester.ExpectTotalCount(kDeclineTranslate, 0);
- }
+ base::HistogramTester histogram_tester;
+ ShowBubble();
+ CloseBubble();
+ histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 1);
+ histogram_tester.ExpectTotalCount(kDeclineTranslate, 0);
+}
+TEST_F(TranslateBubbleControllerTest, CloseRegistersDecline2) {
+ const char kDeclineTranslateDismissUI[] =
+ "Translate.DeclineTranslateDismissUI";
+ const char kDeclineTranslate[] = "Translate.DeclineTranslate";
// A close while pressing e.g. 'x', registers as decline.
- {
- base::HistogramTester histogram_tester;
- ShowBubble();
- [bubble() handleCloseButtonPressed:nil];
-
- CloseBubble();
- histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 0);
- histogram_tester.ExpectTotalCount(kDeclineTranslate, 1);
- }
+ base::HistogramTester histogram_tester;
+ ShowBubble();
+ [bubble() handleCloseButtonPressed:nil];
+
+ CloseBubble();
+ histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 0);
+ histogram_tester.ExpectTotalCount(kDeclineTranslate, 1);
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698