OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/crw_pass_kit_downloader.h" | 5 #import "ios/web/web_state/crw_pass_kit_downloader.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
12 #include "ios/web/public/test/web_test.h" | 12 #include "ios/web/public/test/web_test.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
15 #include "net/url_request/test_url_fetcher_factory.h" | 15 #include "net/url_request/test_url_fetcher_factory.h" |
16 #include "net/url_request/url_fetcher_delegate.h" | 16 #include "net/url_request/url_fetcher_delegate.h" |
17 #include "net/url_request/url_request_test_util.h" | 17 #include "net/url_request/url_request_test_util.h" |
18 #include "testing/gtest_mac.h" | 18 #import "testing/gtest_mac.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 using net::HttpResponseHeaders; | 21 using net::HttpResponseHeaders; |
22 using net::URLRequestStatus; | 22 using net::URLRequestStatus; |
23 | 23 |
24 namespace web { | 24 namespace web { |
25 | 25 |
26 // Constant URL to use in tests. | 26 // Constant URL to use in tests. |
27 const char kTestUrlString[] = "http://www.example.com"; | 27 const char kTestUrlString[] = "http://www.example.com"; |
28 | 28 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 net::TestURLFetcher* fetcher = fetcher_factory_->GetFetcherByID(0); | 132 net::TestURLFetcher* fetcher = fetcher_factory_->GetFetcherByID(0); |
133 ASSERT_TRUE(fetcher); | 133 ASSERT_TRUE(fetcher); |
134 ASSERT_EQ(test_url, fetcher->GetOriginalURL()); | 134 ASSERT_EQ(test_url, fetcher->GetOriginalURL()); |
135 SetUpFetcher(fetcher, URLRequestStatus(), 200, kPassKitMimeType); | 135 SetUpFetcher(fetcher, URLRequestStatus(), 200, kPassKitMimeType); |
136 fetcher->delegate()->OnURLFetchComplete(fetcher); | 136 fetcher->delegate()->OnURLFetchComplete(fetcher); |
137 | 137 |
138 EXPECT_FALSE(completion_handler_success_); | 138 EXPECT_FALSE(completion_handler_success_); |
139 } | 139 } |
140 | 140 |
141 } // namespace | 141 } // namespace |
OLD | NEW |