summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-04-23 13:20:49 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 20:20:48 +0000
commita0804e2196ecc3ce4be9059f1b69b3301e66183c (patch)
treeb7cd47d493af0f0e15c63484675398c1e2ad1e7d
parent74e830b4a071cc839a0f9d4dc37297c68039a47b (diff)
downloadchromium_src-a0804e2196ecc3ce4be9059f1b69b3301e66183c.zip
chromium_src-a0804e2196ecc3ce4be9059f1b69b3301e66183c.tar.gz
chromium_src-a0804e2196ecc3ce4be9059f1b69b3301e66183c.tar.bz2
mac: Fix unit tests compile failures against the OSX 10.10 SDK.
No intended behavioral change. BUG=463170 TBR=jackhou@chromium.org, avi@chromium.org Review URL: https://codereview.chromium.org/1098213002 Cr-Commit-Position: refs/heads/master@{#326626}
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm5
-rw-r--r--chrome/browser/web_applications/web_app_mac_unittest.mm2
-rw-r--r--ui/base/test/ui_controls_mac.mm2
-rw-r--r--ui/views/test/event_generator_delegate_mac.mm6
4 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
index 8ac4371..727df0b 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
@@ -94,7 +94,12 @@ using bookmarks::BookmarkNode;
@private
NSSize cellSize_;
}
+#if !defined(MAC_OS_X_VERSION_10_10) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
+// In the OSX 10.10 SDK, cellSize became an atomic property, so there is no
+// need to redeclare it.
@property (nonatomic, readonly) NSSize cellSize;
+#endif // MAC_OS_X_VERSION_10_10
@end
@implementation CellWithDesiredSize
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index 499ac56..fd29851 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -223,7 +223,7 @@ TEST_F(WebAppShortcutCreatorTest, DeleteShortcuts) {
NSString* plist_path = base::mac::FilePathToNSString(
shim_path_.Append("Contents").Append("Info.plist"));
NSMutableDictionary* plist =
- [NSDictionary dictionaryWithContentsOfFile:plist_path];
+ [NSMutableDictionary dictionaryWithContentsOfFile:plist_path];
[plist setObject:@"fake_user_data_dir"
forKey:app_mode::kCrAppModeUserDataDirKey];
[plist writeToFile:plist_path
diff --git a/ui/base/test/ui_controls_mac.mm b/ui/base/test/ui_controls_mac.mm
index 1a0f86c..002cb03 100644
--- a/ui/base/test/ui_controls_mac.mm
+++ b/ui/base/test/ui_controls_mac.mm
@@ -279,7 +279,7 @@ bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
return (SendMouseEventsNotifyWhenDone(type, DOWN, base::Closure()) &&
SendMouseEventsNotifyWhenDone(type, UP, task));
}
- NSEventType etype = 0;
+ NSEventType etype = NSLeftMouseDown;
if (type == LEFT) {
if (state == UP) {
etype = NSLeftMouseUp;
diff --git a/ui/views/test/event_generator_delegate_mac.mm b/ui/views/test/event_generator_delegate_mac.mm
index b36eb53..18f81c0 100644
--- a/ui/views/test/event_generator_delegate_mac.mm
+++ b/ui/views/test/event_generator_delegate_mac.mm
@@ -78,8 +78,6 @@ NSEventType EventTypeToNative(ui::EventType ui_event_type,
if (modifiers)
*modifiers = EventFlagsToModifiers(flags);
switch (ui_event_type) {
- case ui::ET_UNKNOWN:
- return 0;
case ui::ET_KEY_PRESSED:
return NSKeyDown;
case ui::ET_KEY_RELEASED:
@@ -111,7 +109,7 @@ NSEventType EventTypeToNative(ui::EventType ui_event_type,
return NSEventTypeSwipe;
default:
NOTREACHED();
- return 0;
+ return NSApplicationDefined;
}
}
@@ -128,6 +126,8 @@ void EmulateSendEvent(NSWindow* window, NSEvent* event) {
case NSKeyUp:
[responder keyUp:event];
return;
+ default:
+ break;
}
// For mouse events, NSWindow will use -[NSView hitTest:] for the initial