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
3 // found in the LICENSE file.
5 #import "ios/chrome/browser/ui/keyboard/UIKeyCommand+Chrome.h"
7 #include "base/mac/scoped_nsobject.h"
8 #include "testing/gtest/include/gtest/gtest.h"
12 // Tests that UIApplication correctly calls the keyboard command action block
14 TEST(UIKeyCommandChromeTest, UIApplicationHandleKeyCommand_CallsBlock) {
15 __block BOOL called = NO;
16 UIKeyCommand* command =
17 [UIKeyCommand cr_keyCommandWithInput:@""
18 modifierFlags:Cr_UIKeyModifierNone
23 [[UIApplication sharedApplication] cr_handleKeyCommand:command];