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

Side by Side Diff: ios/web/public/web_state/page_viewport_state_unittest.mm

Issue 2937503004: [ObjC ARC] Converts ios/web:ios_web_public_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 unified diff | Download patch
« no previous file with comments | « ios/web/public/user_agent_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/page_viewport_state.h" 5 #import "ios/web/web_state/page_viewport_state.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
11 namespace web { 15 namespace web {
12 16
13 // Verifies viewport length construction for "device-width" and "device-height". 17 // Verifies viewport length construction for "device-width" and "device-height".
14 TEST(ViewportLengthTest, DeviceDimension) { 18 TEST(ViewportLengthTest, DeviceDimension) {
15 ViewportLength device_width(@"device-width"); 19 ViewportLength device_width(@"device-width");
16 EXPECT_TRUE(device_width.use_device_length()); 20 EXPECT_TRUE(device_width.use_device_length());
17 EXPECT_TRUE(isnan(device_width.value())); 21 EXPECT_TRUE(isnan(device_width.value()));
18 ViewportLength device_height(@"device-height"); 22 ViewportLength device_height(@"device-height");
19 EXPECT_TRUE(device_height.use_device_length()); 23 EXPECT_TRUE(device_height.use_device_length());
20 EXPECT_TRUE(isnan(device_height.value())); 24 EXPECT_TRUE(isnan(device_height.value()));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 EXPECT_TRUE(state.user_scalable()); 69 EXPECT_TRUE(state.user_scalable());
66 state = PageViewportState(@"user-scalable=1"); 70 state = PageViewportState(@"user-scalable=1");
67 EXPECT_TRUE(state.user_scalable()); 71 EXPECT_TRUE(state.user_scalable());
68 state = PageViewportState(@"user-scalable=no"); 72 state = PageViewportState(@"user-scalable=no");
69 EXPECT_FALSE(state.user_scalable()); 73 EXPECT_FALSE(state.user_scalable());
70 state = PageViewportState(@"user-scalable=0"); 74 state = PageViewportState(@"user-scalable=0");
71 EXPECT_FALSE(state.user_scalable()); 75 EXPECT_FALSE(state.user_scalable());
72 } 76 }
73 77
74 } // namespace web 78 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/user_agent_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698