| 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 #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 Loading... |
| 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 } |
| OLD | NEW |