Index: ios/chrome/test/app/chrome_test_util.mm |
diff --git a/ios/chrome/test/app/chrome_test_util.mm b/ios/chrome/test/app/chrome_test_util.mm |
index 32d669fb7cbb35df9c28b48a24307bdc1ab895af..a6cb4ca02ac55fb1df767abc72217e47d341dd0e 100644 |
--- a/ios/chrome/test/app/chrome_test_util.mm |
+++ b/ios/chrome/test/app/chrome_test_util.mm |
@@ -133,6 +133,12 @@ NSUInteger GetRegisteredKeyCommandsCount() { |
return mainBVC.keyCommands.count; |
} |
+id<BrowserCommands> BrowserCommandDispatcherForMainBVC() { |
+ BrowserViewController* mainBVC = |
+ GetMainController().browserViewInformation.mainBVC; |
+ return mainBVC.browserCommandDispatcher; |
+} |
+ |
void RunCommandWithActiveViewController(GenericChromeCommand* command) { |
[GetActiveViewController() chromeExecuteCommand:command]; |
} |