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

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

Issue 595053002: mac: Fix StatusBubbleMacTest on OSX 10.10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_spellcheck_test
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
index 4297a397f623c5bb9bb41a3e964fd28227982af5..1b608998db801ce1014b72e51d42f4e42b8c55cc 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
@@ -14,6 +14,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
#include "ui/gfx/point.h"
#include "url/gurl.h"
@@ -579,6 +580,14 @@ TEST_F(StatusBubbleMacTest, StatuBubbleRespectsBaseFrameLimits) {
TEST_F(StatusBubbleMacTest, ExpandBubble) {
NSWindow* window = test_window();
+
+ // The system font changes between OSX 10.9 and OSX 10.10. Use the system
+ // font from OSX 10.9 for this test.
+ id mockContentView =
+ [OCMockObject partialMockForObject:[GetWindow() contentView]];
+ [[[mockContentView stub]
+ andReturn:[NSFont fontWithName:@"Lucida Grande" size:11]] font];
+
ASSERT_TRUE(window);
NSRect window_frame = [window frame];
window_frame.size.width = 600.0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698