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

Unified Diff: chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted Created 4 years, 8 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/base_bubble_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
index d64940f641cfedda41cffc886e9fbbc30cf0cf9e..5bfb3c4d4a262790313fae3c933665dea290804b 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
-#include "base/mac/mac_util.h"
#import "base/mac/scoped_nsobject.h"
#import "base/mac/scoped_objc_class_swizzler.h"
#import "base/mac/sdk_forward_declarations.h"
@@ -146,17 +145,13 @@ class BaseBubbleControllerTest : public CocoaTest {
// Instead of the hacks below, one could make a browser_test or transform the
// process type, but this seems easiest and is best suited to a unit test.
//
- // On Lion and above, which have the event taps, simply post a notification
- // that will cause the controller to call |-windowDidResignKey:|. Earlier
- // OSes can call through directly.
+ // Simply post a notification that will cause the controller to call
+ // |-windowDidResignKey:|.
void SimulateKeyStatusChange() {
NSNotification* notif =
[NSNotification notificationWithName:NSWindowDidResignKeyNotification
object:[controller_ window]];
- if (base::mac::IsOSLionOrLater())
- [[NSNotificationCenter defaultCenter] postNotification:notif];
- else
- [controller_ windowDidResignKey:notif];
+ [[NSNotificationCenter defaultCenter] postNotification:notif];
}
protected:
@@ -285,10 +280,6 @@ TEST_F(BaseBubbleControllerTest, ResignKeyCloses) {
// Test that clicking outside the window causes the bubble to close if
// shouldCloseOnResignKey is YES.
TEST_F(BaseBubbleControllerTest, LionClickOutsideClosesWithoutContextMenu) {
- // The event tap is only installed on 10.7+.
- if (!base::mac::IsOSLionOrLater())
- return;
-
base::scoped_nsobject<BaseBubbleController> keep_alive = ShowBubble();
NSWindow* window = [controller_ window];
@@ -327,10 +318,6 @@ TEST_F(BaseBubbleControllerTest, LionClickOutsideClosesWithoutContextMenu) {
// Test that right-clicking the window with displaying a context menu causes
// the bubble to close.
TEST_F(BaseBubbleControllerTest, LionRightClickOutsideClosesWithContextMenu) {
- // The event tap is only installed on 10.7+.
- if (!base::mac::IsOSLionOrLater())
- return;
-
base::scoped_nsobject<BaseBubbleController> keep_alive = ShowBubble();
NSWindow* window = [controller_ window];
@@ -443,10 +430,6 @@ TEST_F(BaseBubbleControllerTest, ExitFullscreen) {
// Tests that a bubble will not close when it's becoming a key window.
TEST_F(BaseBubbleControllerTest, StayOnFocus) {
- // The event tap is only installed on 10.7+.
- if (!base::mac::IsOSLionOrLater())
- return;
-
[controller_ setShouldOpenAsKeyWindow:NO];
base::scoped_nsobject<BaseBubbleController> keep_alive = ShowBubble();
« no previous file with comments | « chrome/browser/ui/cocoa/base_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698