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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm

Issue 1137543004: [Permission Bubble] Allow re-display after ESC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h " 5 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h "
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 ChangePermissionMenuSelection(menu_b, IDS_PERMISSION_ALLOW); 294 ChangePermissionMenuSelection(menu_b, IDS_PERMISSION_ALLOW);
295 } 295 }
296 296
297 TEST_F(PermissionBubbleControllerTest, EscapeCloses) { 297 TEST_F(PermissionBubbleControllerTest, EscapeCloses) {
298 [controller_ showAtAnchor:NSZeroPoint 298 [controller_ showAtAnchor:NSZeroPoint
299 withDelegate:this 299 withDelegate:this
300 forRequests:requests_ 300 forRequests:requests_
301 acceptStates:accept_states_]; 301 acceptStates:accept_states_];
302 302
303 EXPECT_TRUE([[controller_ window] isVisible]); 303 EXPECT_TRUE([[controller_ window] isVisible]);
304 EXPECT_CALL(*this, Closing()).Times(1);
304 [[controller_ window] 305 [[controller_ window]
305 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( 306 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
306 kVK_Escape, '\e', NSKeyDown, 0)]; 307 kVK_Escape, '\e', NSKeyDown, 0)];
307 EXPECT_FALSE([[controller_ window] isVisible]); 308 EXPECT_FALSE([[controller_ window] isVisible]);
308 } 309 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698