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

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

Issue 968263005: [Mac] Cleans up the StatusBubbleMac code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review. 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/status_bubble_mac.mm ('k') | 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 a828a43a10eab606eaf8f389d305795aaaa3e379..0ffc1133a89367c4e0e4e355fea8d073d742a8ca 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
@@ -667,3 +667,19 @@ TEST_F(StatusBubbleMacTest, BubbleAvoidsMouse) {
ASSERT_TRUE(CheckAvoidsMouse(x, smallValue));
}
}
+
+TEST_F(StatusBubbleMacTest, ReparentBubble) {
+ // The second window is borderless, like the window used in fullscreen mode.
+ base::scoped_nsobject<NSWindow> fullscreenParent(
+ [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
+
+ // Switch parents with the bubble hidden.
+ bubble_->SwitchParentWindow(fullscreenParent);
+
+ // Switch back to the original parent with the bubble showing.
+ bubble_->SetStatus(UTF8ToUTF16("Showing"));
+ bubble_->SwitchParentWindow(test_window());
+}
« no previous file with comments | « chrome/browser/ui/cocoa/status_bubble_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698