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

Unified Diff: ios/web/test/web_test_unittest.mm

Issue 2934083002: [ObjC ARC] Converts ios/web:ios_web_general_unittests to ARC. (Closed)
Patch Set: Created 3 years, 6 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/history_state_util_unittest.mm ('k') | ios/web/url_scheme_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/test/web_test_unittest.mm
diff --git a/ios/web/test/web_test_unittest.mm b/ios/web/test/web_test_unittest.mm
index d6dabac86afacbd33ea297b051ed4157b9d0dd32..a5b77517625769b825148c77d228f6aeb6a96df5 100644
--- a/ios/web/test/web_test_unittest.mm
+++ b/ios/web/test/web_test_unittest.mm
@@ -9,6 +9,10 @@
#import "ios/web/test/wk_web_view_crash_utils.h"
#include "testing/gtest/include/gtest/gtest-spi.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Fixture to test that the WebTest fixture properly fails tests when the render
@@ -17,15 +21,15 @@ class WebTestFixtureTest : public web::WebTestWithWebController {
protected:
void SetUp() override {
web::WebTestWithWebController::SetUp();
- web_view_.reset([web::BuildTerminatedWKWebView() retain]);
- base::scoped_nsobject<TestWebViewContentView> web_view_content_view(
+ web_view_ = web::BuildTerminatedWKWebView();
+ TestWebViewContentView* web_view_content_view =
[[TestWebViewContentView alloc]
initWithMockWebView:web_view_
- scrollView:[web_view_ scrollView]]);
+ scrollView:[web_view_ scrollView]];
[web_controller() injectWebViewContentView:web_view_content_view];
}
- base::scoped_nsobject<WKWebView> web_view_;
+ WKWebView* web_view_;
};
// Tests that the WebTest fixture triggers a test failure when a render process
« no previous file with comments | « ios/web/history_state_util_unittest.mm ('k') | ios/web/url_scheme_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698