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

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

Issue 915313002: [Mac] Remove -[NSWindow drawRect] swizzling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nawc
Patch Set: Address comments Created 5 years, 10 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/custom_frame_view.mm ('k') | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
diff --git a/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm b/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
index 4f061cdd019a7aab30444a74883eaead17f991f1..1c286d3957ccf28a5902e900fccd61d399d08c66 100644
--- a/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
@@ -29,16 +29,20 @@ class CustomFrameViewTest : public PlatformTest {
// Test to make sure our class modifications were successful.
TEST_F(CustomFrameViewTest, SuccessfulClassModifications) {
+ // In Yosemite, the fullscreen button replaces the zoom button. We no longer
+ // need to swizzle out this AppKit private method.
+ if (!base::mac::IsOSMavericksOrEarlier())
+ return;
+
unsigned int count;
- BOOL foundDrawRectOriginal = NO;
+ BOOL foundSwizzledMethod = NO;
Method* methods = class_copyMethodList([view_ class], &count);
for (unsigned int i = 0; i < count; ++i) {
SEL selector = method_getName(methods[i]);
- if (selector == @selector(drawRectOriginal:)) {
- foundDrawRectOriginal = YES;
- }
+ if (selector == @selector(_fullScreenButtonOriginOriginal))
+ foundSwizzledMethod = YES;
}
- EXPECT_TRUE(foundDrawRectOriginal);
+ EXPECT_TRUE(foundSwizzledMethod);
free(methods);
}
« no previous file with comments | « chrome/browser/ui/cocoa/custom_frame_view.mm ('k') | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698