Refer to https://codereview.chromium.org/2922773002/diff/750001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc KeyEventsShouldBeConsumedByWebPageInJsFullscreenExceptForF11 test case. When executing SendFullscreenShortcutAndWait(), the binary crashes with callstack,
2017-07-07 11:10:36.401 interactive_ui_tests[39748:303] (
0 CoreFoundation 0x00007fff9270125c __exceptionPreprocess + 172
1 interactive_ui_tests 0x0000000109502d70 _ZN6chromeL25ObjcExceptionPreprocessorEP11objc_object + 784
2 libobjc.A.dylib 0x00007fff893e8e75 objc_exception_throw + 43
3 CoreFoundation 0x00007fff925b99a6 -[__NSPlaceholderArray initWithObjects:count:] + 358
4 CoreFoundation 0x00007fff9261d440 +[NSArray arrayWithObjects:count:] + 48
5 interactive_ui_tests 0x000000010d04c9d2 -[BrowserWindowFullscreenTransition customWindowsForFullScreenTransition] + 114
6 interactive_ui_tests 0x000000010d04bc00 -[BrowserWindowController(Private) customWindowsToEnterFullScreenForWindow:] + 320
7 AppKit 0x00007fff8a26d000 -[_NSFullScreenTransition enterFullScreenTransitionWithOptions:animated:activatingIt:] + 837
8 AppKit 0x00007fff8a26c48e -[NSWindow _enterFullScreenMode:animating:activating:] + 291
9 AppKit 0x00007fff8a19f260 -[NSApplication sendAction:to:from:] + 327
10 interactive_ui_tests 0x00000001094621cb __43-[BrowserCrApplication sendAction:to:from:]_block_invoke + 59
11 interactive_ui_tests 0x000000010a5a805a _ZN4base3mac15CallWithEHFrameEU13block_pointerFvvE + 10
12 interactive_ui_tests 0x00000001094620ce -[BrowserCrApplication sendAction:to:from:] + 846
13 AppKit 0x00007fff8a1ba1c8 -[NSMenuItem _corePerformAction] + 394
14 AppKit 0x00007fff8a1b9f04 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 117
15 AppKit 0x00007fff8a1b9243 -[NSMenu performKeyEquivalent:] + 744
16 AppKit 0x00007fff8a1b91b0 -[NSMenu performKeyEquivalent:] + 597
17 interactive_ui_tests 0x000000010d0509e9 +[BrowserWindowUtils handleKeyboardEvent:inWindow:] + 185
18 interactive_ui_tests 0x000000010d0405f2 _ZN18BrowserWindowCocoa19HandleKeyboardEventERKN7content22NativeWebKeyboardEventE + 98
19 interactive_ui_tests 0x0000000107ee18eb _ZN7content20RenderWidgetHostImpl18OnKeyboardEventAckERKNS_20EventWithLatencyInfoINS_22NativeWebKeyboardEventEEENS_18InputEventAckStateE + 283
20 interactive_ui_tests 0x0000000107e39898 _ZN7content21LegacyInputRouterImpl18ProcessKeyboardAckEN5blink13WebInputEvent4TypeENS_18InputEventAckStateERKN2ui11LatencyInfoE + 344
21 interactive_ui_tests 0x0000000107e394a8 _ZN7content21LegacyInputRouterImpl20ProcessInputEventAckEN5blink13WebInputEvent4TypeENS_18InputEventAckStateERKN2ui11LatencyInfoEjNS0_9AckSourceE + 104
22 interactive_ui_tests 0x0000000107e38092 _ZN7content21LegacyInputRouterImpl15OnInputEventAckERKNS_13InputEventAckE + 162
23 interactive_ui_tests 0x0000000107e37efe _ZN3IPC8MessageTI38InputHostMsg_HandleInputEvent_ACK_MetaNSt3__15tupleIJN7content13InputEventAckEEEEvE8DispatchINS4_21LegacyInputRouterImplES9_vMS9_FvRKS5_EEEbPKNS_7MessageEPT_PT0_PT1_T2_ + 126
24 interactive_ui_tests 0x0000000107e37961 _ZN7content21LegacyInputRouterImpl17OnMessageReceivedERKN3IPC7MessageE + 289
25 interactive_ui_tests 0x0000000107ed7130 _ZN7content20RenderWidgetHostImpl17OnMessageReceivedERKN3IPC7MessageE + 3712
26 interactive_ui_tests 0x0000000107eb886a _ZN7content21RenderProcessHostImpl17OnMessageReceivedERKN3IPC7MessageE + 682
27 interactive_ui_tests 0x000000010ad6e951 _ZN3IPC12ChannelProxy7Context17OnDispatchMessageERKNS_7MessageE + 129
28 interactive_ui_tests 0x000000010a582c8b _ZN4base5debug13TaskAnnotator7RunTaskEPKcPNS_11PendingTaskE + 251
29 interactive_ui_tests 0x000000010a5bf819 _ZN4base11MessageLoop7RunTaskEPNS_11PendingTaskE + 425
30 interactive_ui_tests 0x000000010a5bfc75 _ZN4base11MessageLoop21DeferOrRunPendingTaskENS_11PendingTaskE + 213
31 interactive_ui_tests 0x000000010a5bffd9 _ZN4base11MessageLoop6DoWorkEv + 425
32 interactive_ui_tests 0x000000010a5c496a _ZN4base24MessagePumpCFRunLoopBase7RunWorkEv + 42
33 interactive_ui_tests 0x000000010a5a805a _ZN4base3mac15CallWithEHFrameEU13block_pointerFvvE + 10
34 interactive_ui_tests 0x000000010a5c428f _ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv + 63
35 CoreFoundation 0x00007fff926325b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
36 CoreFoundation 0x00007fff92623c62 __CFRunLoopDoSources0 + 242
37 CoreFoundation 0x00007fff926233ef __CFRunLoopRun + 831
38 CoreFoundation 0x00007fff92622e75 CFRunLoopRunSpecific + 309
39 HIToolbox 0x00007fff8d7a5a0d RunCurrentEventLoopInMode + 226
40 HIToolbox 0x00007fff8d7a57b7 ReceiveNextEventCommon + 479
41 HIToolbox 0x00007fff8d7a55bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
42 AppKit 0x00007fff89f8124e _DPSNextEvent + 1434
43 AppKit 0x00007fff89f8089b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
44 interactive_ui_tests 0x0000000109461cb0 __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke + 64
45 interactive_ui_tests 0x000000010a5a805a _ZN4base3mac15CallWithEHFrameEU13block_pointerFvvE + 10
46 interactive_ui_tests 0x0000000109461bf4 -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 164
47 AppKit 0x00007fff89f7499c -[NSApplication run] + 553
48 interactive_ui_tests 0x000000010a5c531e _ZN4base24MessagePumpNSApplication5DoRunEPNS_11MessagePump8DelegateE + 334
49 interactive_ui_tests 0x000000010a5c3adc _ZN4base24MessagePumpCFRunLoopBase3RunEPNS_11MessagePump8DelegateE + 92
50 interactive_ui_tests 0x000000010a5bf3fb _ZN4base11MessageLoop3RunEv + 219
51 interactive_ui_tests 0x000000010a5fac58 _ZN4base7RunLoop3RunEv + 168
52 interactive_ui_tests 0x0000000109b49e69 _ZN7content17MessageLoopRunner3RunEv + 153
53 interactive_ui_tests 0x0000000109b4a4e3 _ZN7content28WindowedNotificationObserver4WaitEv + 179
54 interactive_ui_tests 0x0000000107063851 _ZN39BrowserCommandControllerInteractiveTest29SendFullscreenShortcutAndWaitEv + 129
Comment 1 by zijiehe@chromium.org
, Jul 7 2017