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

Unified Diff: ios/web/web_state/page_display_state_unittest.mm

Issue 2935933003: [ObjC ARC] Converts ios/web:ios_web_web_state_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
Index: ios/web/web_state/page_display_state_unittest.mm
diff --git a/ios/web/web_state/page_display_state_unittest.mm b/ios/web/web_state/page_display_state_unittest.mm
index ac9c73a89f0cf4275a899d82c1f500d136f91b96..ce2a518a6f195f0fd0b52ab6d89c8af255aa9ca5 100644
--- a/ios/web/web_state/page_display_state_unittest.mm
+++ b/ios/web/web_state/page_display_state_unittest.mm
@@ -4,11 +4,14 @@
#import "ios/web/public/web_state/page_display_state.h"
-#import "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#define EXPECT_NAN(value) EXPECT_NE(value, value)
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// Tests that the empty constructor creates an invalid PageDisplayState with all
// NAN values.
TEST(PageDisplayStateTest, EmptyConstructor) {
@@ -58,8 +61,7 @@ TEST(PageDisplayStateTest, ValuesConstructor) {
// Tests converting between a PageDisplayState, its serialization, and back.
TEST(PageDisplayStateTest, Serialization) {
web::PageDisplayState state(0.0, 1.0, 1.0, 5.0, 1.0);
- base::scoped_nsobject<NSDictionary> serialization(
- [state.GetSerialization() retain]);
+ NSDictionary* serialization = state.GetSerialization();
Eugene But (OOO till 7-30) 2017/06/14 13:34:02 Optional nit: consider dropping |serialization| lo
marq (ping after 24h) 2017/06/14 14:18:23 Done.
web::PageDisplayState new_state(serialization);
EXPECT_EQ(state, new_state);
}

Powered by Google App Engine
This is Rietveld 408576698