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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm

Issue 592353005: Change ShowBubbleOnInactiveTabShouldDoNothing to not use GetTopLevelNativeWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing. 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/passwords/manage_passwords_bubble_cocoa_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm
index 5db7f0222cff0bf12d3520dda94e91fbf882c1a0..348bed5712c429983c6f80b47f8859f4d0532798 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm
@@ -106,14 +106,14 @@ TEST_F(ManagePasswordsBubbleCocoaTest, BackgroundCloseShouldDeleteBubble) {
TEST_F(ManagePasswordsBubbleCocoaTest, ShowBubbleOnInactiveTabShouldDoNothing) {
// Start in the tab that we'll try to show the bubble on.
- EXPECT_TRUE(webContents()->GetTopLevelNativeWindow());
+ TabStripModel* tabStripModel = browser()->tab_strip_model();
+ EXPECT_EQ(0, tabStripModel->active_index());
// Open a second tab and make it active.
content::WebContents* webContents2 = CreateWebContents();
- browser()->tab_strip_model()->AppendWebContents(webContents2,
- /*foreground=*/true);
- EXPECT_FALSE(webContents()->GetTopLevelNativeWindow());
- EXPECT_TRUE(webContents2->GetTopLevelNativeWindow());
+ tabStripModel->AppendWebContents(webContents2, /*foreground=*/true);
+ EXPECT_EQ(1, tabStripModel->active_index());
+ EXPECT_EQ(2, tabStripModel->count());
// Try to show the bubble on the inactive tab. Nothing should happen.
ShowBubble();
« 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