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

Side by Side Diff: ios/chrome/browser/net/retryable_url_fetcher_unittest.mm

Issue 2517633002: [ObjC ARC] Converts ios/chrome/browser/net:unit_tests to ARC.Automatically generated ARCMigrate c… (Closed)
Patch Set: Created 4 years, 1 month 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/chrome/browser/net/metrics_network_client_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome/browser/net/retryable_url_fetcher.h" 5 #import "ios/chrome/browser/net/retryable_url_fetcher.h"
6 6
7 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ios/web/public/test/test_web_thread.h" 9 #include "ios/web/public/test/test_web_thread.h"
10 #include "net/url_request/test_url_fetcher_factory.h" 10 #include "net/url_request/test_url_fetcher_factory.h"
11 #include "net/url_request/url_fetcher_delegate.h" 11 #include "net/url_request/url_fetcher_delegate.h"
12 #include "net/url_request/url_request_test_util.h" 12 #include "net/url_request/url_request_test_util.h"
13 #import "testing/gtest_mac.h" 13 #import "testing/gtest_mac.h"
14 #include "testing/platform_test.h" 14 #include "testing/platform_test.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 namespace { 20 namespace {
17 // An arbitrary text string for a fake response. 21 // An arbitrary text string for a fake response.
18 NSString* const kFakeResponseString = @"Something interesting here."; 22 NSString* const kFakeResponseString = @"Something interesting here.";
19 } 23 }
20 24
21 // Delegate object to provide data for RetryableURLFetcher and 25 // Delegate object to provide data for RetryableURLFetcher and
22 // handles the callback when URL is fetched. 26 // handles the callback when URL is fetched.
23 @interface TestRetryableURLFetcherDelegate 27 @interface TestRetryableURLFetcherDelegate
24 : NSObject<RetryableURLFetcherDelegate> 28 : NSObject<RetryableURLFetcherDelegate>
25 // Counts the number of times that a successful response has been processed. 29 // Counts the number of times that a successful response has been processed.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // |failing_delegate| does not have URL to fetch, so a fetcher should never 140 // |failing_delegate| does not have URL to fetch, so a fetcher should never
137 // be created. 141 // be created.
138 net::TestURLFetcher* fetcher = factory_.GetFetcherByID(0); 142 net::TestURLFetcher* fetcher = factory_.GetFetcherByID(0);
139 EXPECT_FALSE(fetcher); 143 EXPECT_FALSE(fetcher);
140 144
141 // Verify that response has been called. 145 // Verify that response has been called.
142 EXPECT_TRUE([failing_delegate responsesProcessed]); 146 EXPECT_TRUE([failing_delegate responsesProcessed]);
143 } 147 }
144 148
145 } // namespace 149 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/net/metrics_network_client_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698