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

Side by Side Diff: ios/web/url_scheme_util_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 unified diff | Download patch
« no previous file with comments | « ios/web/test/web_test_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/public/url_scheme_util.h" 5 #import "ios/web/public/url_scheme_util.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #import "testing/gtest_mac.h" 9 #import "testing/gtest_mac.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support."
14 #endif
15
12 namespace web { 16 namespace web {
13 17
14 TEST(URLSchemeUtilTest, UrlHasWebScheme) { 18 TEST(URLSchemeUtilTest, UrlHasWebScheme) {
15 EXPECT_TRUE(UrlHasWebScheme(GURL("http://foo.com"))); 19 EXPECT_TRUE(UrlHasWebScheme(GURL("http://foo.com")));
16 EXPECT_TRUE(UrlHasWebScheme(GURL("https://foo.com"))); 20 EXPECT_TRUE(UrlHasWebScheme(GURL("https://foo.com")));
17 EXPECT_TRUE(UrlHasWebScheme(GURL("data:text/html;charset=utf-8,Hello"))); 21 EXPECT_TRUE(UrlHasWebScheme(GURL("data:text/html;charset=utf-8,Hello")));
18 EXPECT_FALSE(UrlHasWebScheme(GURL("about:blank"))); 22 EXPECT_FALSE(UrlHasWebScheme(GURL("about:blank")));
19 EXPECT_FALSE(UrlHasWebScheme(GURL("chrome://settings"))); 23 EXPECT_FALSE(UrlHasWebScheme(GURL("chrome://settings")));
20 } 24 }
21 25
22 TEST(URLSchemeUtilTest, NSURLHasWebScheme) { 26 TEST(URLSchemeUtilTest, NSURLHasWebScheme) {
23 EXPECT_TRUE(UrlHasWebScheme([NSURL URLWithString:@"http://foo.com"])); 27 EXPECT_TRUE(UrlHasWebScheme([NSURL URLWithString:@"http://foo.com"]));
24 EXPECT_TRUE(UrlHasWebScheme([NSURL URLWithString:@"https://foo.com"])); 28 EXPECT_TRUE(UrlHasWebScheme([NSURL URLWithString:@"https://foo.com"]));
25 EXPECT_TRUE(UrlHasWebScheme( 29 EXPECT_TRUE(UrlHasWebScheme(
26 [NSURL URLWithString:@"data:text/html;charset=utf-8,Hello"])); 30 [NSURL URLWithString:@"data:text/html;charset=utf-8,Hello"]));
27 EXPECT_FALSE(UrlHasWebScheme([NSURL URLWithString:@"about:blank"])); 31 EXPECT_FALSE(UrlHasWebScheme([NSURL URLWithString:@"about:blank"]));
28 EXPECT_FALSE(UrlHasWebScheme([NSURL URLWithString:@"chrome://settings"])); 32 EXPECT_FALSE(UrlHasWebScheme([NSURL URLWithString:@"chrome://settings"]));
29 } 33 }
30 34
31 } // namespace web 35 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/test/web_test_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698