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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac_unittest.mm

Issue 1858773006: [Extensions UI] Use the ExtensionMessageBubbleBridge for Views platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/logging.h" 5 #include "base/logging.h"
6 #import "base/mac/foundation_util.h" 6 #import "base/mac/foundation_util.h"
7 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 CocoaTest::SetUp(); 85 CocoaTest::SetUp();
86 [ToolbarActionsBarBubbleMac setAnimationEnabledForTesting:NO]; 86 [ToolbarActionsBarBubbleMac setAnimationEnabledForTesting:NO];
87 } 87 }
88 88
89 ToolbarActionsBarBubbleMac* ToolbarActionsBarBubbleMacTest::CreateAndShowBubble( 89 ToolbarActionsBarBubbleMac* ToolbarActionsBarBubbleMacTest::CreateAndShowBubble(
90 TestToolbarActionsBarBubbleDelegate* delegate) { 90 TestToolbarActionsBarBubbleDelegate* delegate) {
91 ToolbarActionsBarBubbleMac* bubble = 91 ToolbarActionsBarBubbleMac* bubble =
92 [[ToolbarActionsBarBubbleMac alloc] 92 [[ToolbarActionsBarBubbleMac alloc]
93 initWithParentWindow:test_window() 93 initWithParentWindow:test_window()
94 anchorPoint:NSZeroPoint 94 anchorPoint:NSZeroPoint
95 anchoredToAction:NO
95 delegate:delegate->GetDelegate()]; 96 delegate:delegate->GetDelegate()];
96 EXPECT_FALSE(delegate->shown()); 97 EXPECT_FALSE(delegate->shown());
97 [bubble showWindow:nil]; 98 [bubble showWindow:nil];
98 chrome::testing::NSRunLoopRunAllPending(); 99 chrome::testing::NSRunLoopRunAllPending();
99 EXPECT_FALSE(delegate->close_action()); 100 EXPECT_FALSE(delegate->close_action());
100 EXPECT_TRUE(delegate->shown()); 101 EXPECT_TRUE(delegate->shown());
101 return bubble; 102 return bubble;
102 } 103 }
103 104
104 void ToolbarActionsBarBubbleMacTest::TestBubbleButton( 105 void ToolbarActionsBarBubbleMacTest::TestBubbleButton(
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ToolbarActionsBarBubbleMac* bubble = CreateAndShowBubble(&delegate); 243 ToolbarActionsBarBubbleMac* bubble = CreateAndShowBubble(&delegate);
243 EXPECT_TRUE([bubble actionButton]); 244 EXPECT_TRUE([bubble actionButton]);
244 EXPECT_TRUE([bubble learnMoreButton]); 245 EXPECT_TRUE([bubble learnMoreButton]);
245 EXPECT_TRUE([bubble dismissButton]); 246 EXPECT_TRUE([bubble dismissButton]);
246 EXPECT_TRUE([bubble itemList]); 247 EXPECT_TRUE([bubble itemList]);
247 248
248 [bubble close]; 249 [bubble close];
249 chrome::testing::NSRunLoopRunAllPending(); 250 chrome::testing::NSRunLoopRunAllPending();
250 } 251 }
251 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698