Index: ios/chrome/browser/web/cache_egtest.mm |
diff --git a/ios/chrome/browser/web/cache_egtest.mm b/ios/chrome/browser/web/cache_egtest.mm |
index 9704f1575058de099733f1476c31ee2132b8d091..90c3926ba147d77369648864ec0836b91c3e0786 100644 |
--- a/ios/chrome/browser/web/cache_egtest.mm |
+++ b/ios/chrome/browser/web/cache_egtest.mm |
@@ -4,7 +4,6 @@ |
#import <EarlGrey/EarlGrey.h> |
-#import "base/mac/scoped_nsobject.h" |
#include "base/memory/ptr_util.h" |
#include "base/strings/stringprintf.h" |
#include "components/content_settings/core/browser/host_content_settings_map.h" |
@@ -26,6 +25,10 @@ |
#include "ios/web/public/test/response_providers/html_response_provider.h" |
#include "url/gurl.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
using chrome_test_util::WebViewContainingText; |
using web::test::HttpServer; |
@@ -157,8 +160,8 @@ class ScopedBlockPopupsPref { |
// Reloads the web view and waits for the loading to complete. |
// TODO(crbug.com/638674): Evaluate if this can move to shared code |
- (void)reloadPage { |
- base::scoped_nsobject<GenericChromeCommand> reloadCommand( |
- [[GenericChromeCommand alloc] initWithTag:IDC_RELOAD]); |
+ GenericChromeCommand* reloadCommand = |
+ [[GenericChromeCommand alloc] initWithTag:IDC_RELOAD]; |
chrome_test_util::RunCommandWithActiveViewController(reloadCommand); |
[ChromeEarlGrey waitForPageToFinishLoading]; |
@@ -167,8 +170,8 @@ class ScopedBlockPopupsPref { |
// Navigates back to the previous webpage. |
// TODO(crbug.com/638674): Evaluate if this can move to shared code. |
- (void)goBack { |
- base::scoped_nsobject<GenericChromeCommand> backCommand( |
- [[GenericChromeCommand alloc] initWithTag:IDC_BACK]); |
+ GenericChromeCommand* backCommand = |
+ [[GenericChromeCommand alloc] initWithTag:IDC_BACK]; |
chrome_test_util::RunCommandWithActiveViewController(backCommand); |
[ChromeEarlGrey waitForPageToFinishLoading]; |