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

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

Issue 2638873002: Revert of [Mac] Fix rough-looking profile picker text, especially with a dark theme. (Closed)
Patch Set: Created 3 years, 11 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/browser_window_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
index a28a7fbfe34dc7569ae05e20c41ec7aab98c26f6..a22fc4592ab9056e00f00efbdfbbd79ad5508fe3 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -700,6 +700,25 @@
EXPECT_TRUE([[contentView hitTest:point] isDescendantOf:bookmarkView]);
}
+// Check that when the window becomes/resigns main, the tab strip's background
+// view is redrawn.
+TEST_F(BrowserWindowControllerTest, TabStripBackgroundViewRedrawTest) {
+ NSView* view = controller_.tabStripBackgroundView;
+ id partial_mock = [OCMockObject partialMockForObject:view];
+
+ [[partial_mock expect] setNeedsDisplay:YES];
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:NSWindowDidBecomeMainNotification
+ object:controller_.window];
+ [partial_mock verify];
+
+ [[partial_mock expect] setNeedsDisplay:YES];
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:NSWindowDidResignMainNotification
+ object:controller_.window];
+ [partial_mock verify];
+}
+
@interface BrowserWindowControllerFakeFullscreen : BrowserWindowController {
@private
// We release the window ourselves, so we don't have to rely on the unittest

Powered by Google App Engine
This is Rietveld 408576698