OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/mac/foundation_util.h" | 5 #include "base/mac/foundation_util.h" |
6 #include "base/mac/scoped_objc_class_swizzler.h" | 6 #include "base/mac/scoped_objc_class_swizzler.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 | 101 |
102 IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, TabChangeTogglesIcon) { | 102 IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, TabChangeTogglesIcon) { |
103 // Show the bubble (and icon) automatically. | 103 // Show the bubble (and icon) automatically. |
104 DoWithSwizzledNSWindow(^{ SetupPendingPassword(); }); | 104 DoWithSwizzledNSWindow(^{ SetupPendingPassword(); }); |
105 EXPECT_TRUE(decoration()->IsVisible()); | 105 EXPECT_TRUE(decoration()->IsVisible()); |
106 | 106 |
107 // Open a new tab. | 107 // Open a new tab. |
108 int firstTab = browser()->tab_strip_model()->active_index(); | 108 int firstTab = browser()->tab_strip_model()->active_index(); |
109 AddTabAtIndex( | 109 AddTabAtIndex( |
110 firstTab + 1, GURL("http://foo.bar/"), content::PAGE_TRANSITION_TYPED); | 110 firstTab + 1, GURL("http://foo.bar/"), ui::PAGE_TRANSITION_TYPED); |
111 EXPECT_FALSE(decoration()->IsVisible()); | 111 EXPECT_FALSE(decoration()->IsVisible()); |
112 | 112 |
113 // Switch back to the previous tab. | 113 // Switch back to the previous tab. |
114 browser()->tab_strip_model()->ActivateTabAt(firstTab, true); | 114 browser()->tab_strip_model()->ActivateTabAt(firstTab, true); |
115 EXPECT_TRUE(decoration()->IsVisible()); | 115 EXPECT_TRUE(decoration()->IsVisible()); |
116 } | 116 } |
OLD | NEW |