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

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: Review fixes. 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..730da6bfb1ca020ef3166b19dd8b658b2f08e84e 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,6 @@ 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]);
- web::PageDisplayState new_state(serialization);
+ web::PageDisplayState new_state(state.GetSerialization());
EXPECT_EQ(state, new_state);
}
« no previous file with comments | « ios/web/web_state/navigation_context_impl_unittest.mm ('k') | ios/web/web_state/web_state_delegate_bridge_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698