Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: ios/chrome/browser/web/cache_egtest.mm

Issue 2890003002: [ObjC ARC] Converts ios/chrome/browser/web:eg_tests to ARC. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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];
« no previous file with comments | « ios/chrome/browser/web/browsing_prevent_default_egtest.mm ('k') | ios/chrome/browser/web/child_window_open_by_dom_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698