| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cocoa/translate/translate_bubble_controller.h" | 5 #include "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" | 
| 6 | 6 | 
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" | 
| 8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" | 
| 9 #import "chrome/browser/ui/browser.h" | 9 #import "chrome/browser/ui/browser.h" | 
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" | 
| 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 
| 12 #import "chrome/browser/ui/cocoa/cocoa_profile_test.h" |  | 
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 12 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 
| 14 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 13 #import "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" | 
|  | 14 #include "chrome/browser/ui/cocoa/test/run_loop_testing.h" | 
| 15 #include "chrome/browser/ui/translate/translate_bubble_model.h" | 15 #include "chrome/browser/ui/translate/translate_bubble_model.h" | 
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" | 
| 17 #include "content/public/browser/site_instance.h" | 17 #include "content/public/browser/site_instance.h" | 
| 18 | 18 | 
| 19 @implementation BrowserWindowController (ForTesting) | 19 @implementation BrowserWindowController (ForTesting) | 
| 20 | 20 | 
| 21 - (TranslateBubbleController*)translateBubbleController{ | 21 - (TranslateBubbleController*)translateBubbleController{ | 
| 22   return translateBubbleController_; | 22   return translateBubbleController_; | 
| 23 } | 23 } | 
| 24 | 24 | 
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 180   { | 180   { | 
| 181     base::HistogramTester histogram_tester; | 181     base::HistogramTester histogram_tester; | 
| 182     ShowBubble(); | 182     ShowBubble(); | 
| 183     [bubble() handleCloseButtonPressed:nil]; | 183     [bubble() handleCloseButtonPressed:nil]; | 
| 184 | 184 | 
| 185     CloseBubble(); | 185     CloseBubble(); | 
| 186     histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 0); | 186     histogram_tester.ExpectTotalCount(kDeclineTranslateDismissUI, 0); | 
| 187     histogram_tester.ExpectTotalCount(kDeclineTranslate, 1); | 187     histogram_tester.ExpectTotalCount(kDeclineTranslate, 1); | 
| 188   } | 188   } | 
| 189 } | 189 } | 
| OLD | NEW | 
|---|