OLD | NEW |
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 #include "net/url_request/url_request_file_dir_job.h" | 5 #include "net/url_request/url_request_file_dir_job.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(TestJobFactory); | 76 DISALLOW_COPY_AND_ASSIGN(TestJobFactory); |
77 }; | 77 }; |
78 | 78 |
79 class TestDirectoryURLRequestDelegate : public TestDelegate { | 79 class TestDirectoryURLRequestDelegate : public TestDelegate { |
80 public: | 80 public: |
81 TestDirectoryURLRequestDelegate() {} | 81 TestDirectoryURLRequestDelegate() {} |
82 | 82 |
83 ~TestDirectoryURLRequestDelegate() override {} | 83 ~TestDirectoryURLRequestDelegate() override {} |
84 | 84 |
85 void OnResponseStarted(URLRequest* request) override { | 85 void OnResponseStarted(URLRequest* request, int net_error) override { |
86 got_response_started_ = true; | 86 got_response_started_ = true; |
87 } | 87 } |
88 | 88 |
89 bool got_response_started() const { return got_response_started_; } | 89 bool got_response_started() const { return got_response_started_; } |
90 | 90 |
91 private: | 91 private: |
92 bool got_response_started_ = false; | 92 bool got_response_started_ = false; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(TestDirectoryURLRequestDelegate); | 94 DISALLOW_COPY_AND_ASSIGN(TestDirectoryURLRequestDelegate); |
95 }; | 95 }; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 ASSERT_GT(delegate.bytes_received(), 0); | 248 ASSERT_GT(delegate.bytes_received(), 0); |
249 ASSERT_LE(delegate.bytes_received(), kBufferSize); | 249 ASSERT_LE(delegate.bytes_received(), kBufferSize); |
250 EXPECT_TRUE(delegate.data_received().find( | 250 EXPECT_TRUE(delegate.data_received().find( |
251 directory.path().BaseName().MaybeAsASCII()) != | 251 directory.path().BaseName().MaybeAsASCII()) != |
252 std::string::npos); | 252 std::string::npos); |
253 } | 253 } |
254 | 254 |
255 } // namespace | 255 } // namespace |
256 | 256 |
257 } // namespace net | 257 } // namespace net |
OLD | NEW |