Index: ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm |
diff --git a/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm b/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm |
index 653bce0c8032c32399fecbe5051d87cef7a471f7..27838b2f4d418bb8aa519589ff106f3b20e19c59 100644 |
--- a/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm |
+++ b/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm |
@@ -214,9 +214,7 @@ id<GREYMatcher> ActionSheet(Action action) { |
} |
// Close the opened tab. |
- GenericChromeCommand* command = |
- [[GenericChromeCommand alloc] initWithTag:IDC_CLOSE_TAB]; |
- chrome_test_util::RunCommandWithActiveViewController(command); |
+ [chrome_test_util::BrowserCommandDispatcherForMainBVC() closeCurrentTab]; |
} |
// Tests that tapping a bookmark on the NTP navigates to the proper URL. |