Index: ios/chrome/test/earl_grey/chrome_earl_grey.mm |
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.mm b/ios/chrome/test/earl_grey/chrome_earl_grey.mm |
index af378f1901843a9f9498ecf1b34f9d0ae28da017..71b4eaf5c1e2de843d3df80cb44b81f65550398c 100644 |
--- a/ios/chrome/test/earl_grey/chrome_earl_grey.mm |
+++ b/ios/chrome/test/earl_grey/chrome_earl_grey.mm |
@@ -122,16 +122,14 @@ id ExecuteJavaScript(NSString* javascript, |
} |
+ (void)goBack { |
- base::scoped_nsobject<GenericChromeCommand> reloadCommand( |
- [[GenericChromeCommand alloc] initWithTag:IDC_BACK]); |
- chrome_test_util::RunCommandWithActiveViewController(reloadCommand); |
+ [chrome_test_util::BrowserCommandDispatcherForMainBVC() goBack]; |
+ |
[ChromeEarlGrey waitForPageToFinishLoading]; |
} |
+ (void)goForward { |
- base::scoped_nsobject<GenericChromeCommand> reloadCommand( |
- [[GenericChromeCommand alloc] initWithTag:IDC_FORWARD]); |
- chrome_test_util::RunCommandWithActiveViewController(reloadCommand); |
+ [chrome_test_util::BrowserCommandDispatcherForMainBVC() goForward]; |
+ |
[ChromeEarlGrey waitForPageToFinishLoading]; |
} |