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

Unified Diff: ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm

Issue 2933363002: [ObjC ARC] Converts ios/web:ios_web_web_state_ui_unittests to ARC. (Closed)
Patch Set: Review nits. 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
Index: ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm
diff --git a/ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm b/ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm
index d6988e898f382c4afe448d5ccd06143b919a92cd..85c77da7cccd543c327ecc6e29947aa1a4452ec4 100644
--- a/ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm
+++ b/ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm
@@ -6,13 +6,16 @@
#import <WebKit/WebKit.h>
-#import "base/mac/scoped_nsobject.h"
#import "ios/web/web_state/navigation_context_impl.h"
#include "net/http/http_response_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
const char kTestUrl1[] = "https://test1.test/";
const char kTestUrl2[] = "https://test2.test/";
@@ -30,10 +33,10 @@ class CRWWKNavigationStatesTest : public PlatformTest {
states_([[CRWWKNavigationStates alloc] init]) {}
protected:
- base::scoped_nsobject<WKNavigation> navigation1_;
- base::scoped_nsobject<WKNavigation> navigation2_;
- base::scoped_nsobject<WKNavigation> navigation3_;
- base::scoped_nsobject<CRWWKNavigationStates> states_;
+ WKNavigation* navigation1_;
+ WKNavigation* navigation2_;
+ WKNavigation* navigation3_;
+ CRWWKNavigationStates* states_;
};
// Tests |removeNavigation:| method.
@@ -103,7 +106,7 @@ TEST_F(CRWWKNavigationStatesTest, Context) {
NavigationContextImpl::CreateNavigationContext(
nullptr /*web_state*/, GURL(kTestUrl2),
ui::PageTransition::PAGE_TRANSITION_GENERATED);
- NSError* error = [[[NSError alloc] init] autorelease];
+ NSError* error = [[NSError alloc] init];
context2->SetError(error);
[states_ setContext:std::move(context2) forNavigation:navigation1_];
EXPECT_FALSE([states_ contextForNavigation:navigation2_]);

Powered by Google App Engine
This is Rietveld 408576698