Fix flaky WebKit escape focus tests

Merged
LA
5mo ago
+23-2

Summary

  • App-side: retry isWebViewFocused check with increasing delays (0.05-0.5s) for the exit-address-bar case
  • Test-side: send a second Escape if the first only clears suggestions/editing state (Chrome-like two-stage escape)

Test plan

  • testEscapeLeavesOmnibarAndFocusesWebView passes on VM
  • testCmdNWorksWhenWebViewFocusedAfterTabSwitch passes on VM
  • testCmdWWorksWhenWebViewFocusedAfterTabSwitch passes on VM
  • testCmdShiftWWorksWhenWebViewFocusedAfterTabSwitch passes on VM