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

Unified Diff: ios/web/public/test/earl_grey/web_view_actions.mm

Issue 2886573002: [ObjC ARC] Converts ios/web:earl_grey_test_support to ARC. (Closed)
Patch Set: remove unecessary if statement 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
« no previous file with comments | « ios/web/public/test/earl_grey/js_test_util.mm ('k') | ios/web/public/test/earl_grey/web_view_matchers.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/earl_grey/web_view_actions.mm
diff --git a/ios/web/public/test/earl_grey/web_view_actions.mm b/ios/web/public/test/earl_grey/web_view_actions.mm
index 0d0b0647b7d2cfe03f917e339eed6c14bb792719..710ddd054f1a33dd9cccbb346a8d63820e2d5028 100644
--- a/ios/web/public/test/earl_grey/web_view_actions.mm
+++ b/ios/web/public/test/earl_grey/web_view_actions.mm
@@ -15,6 +15,10 @@
#import "ios/web/public/test/web_view_interaction_test_util.h"
#import "ios/web/web_state/web_state_impl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
using web::test::ExecuteJavaScript;
namespace {
@@ -90,12 +94,12 @@ bool AddVerifierToElementWithId(web::WebState* web_state,
// The callback doesn't care about any of the parameters, just whether it is
// called or not.
- auto callback = base::BindBlock(^bool(const base::DictionaryValue& /* json */,
- const GURL& /* origin_url */,
- bool /* user_is_interacting */) {
- *verified = true;
- return true;
- });
+ auto callback = base::BindBlockArc(
+ ^bool(const base::DictionaryValue& /* json */,
+ const GURL& /* origin_url */, bool /* user_is_interacting */) {
+ *verified = true;
+ return true;
+ });
static_cast<web::WebStateImpl*>(web_state)->AddScriptCommandCallback(
callback, kCallbackPrefix);
« no previous file with comments | « ios/web/public/test/earl_grey/js_test_util.mm ('k') | ios/web/public/test/earl_grey/web_view_matchers.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698