OLD | NEW |
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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const char kHeaders[] = | 201 const char kHeaders[] = |
202 "HTTP/1.1 200 OK\0" | 202 "HTTP/1.1 200 OK\0" |
203 "Content-Type: text/javascript\0" | 203 "Content-Type: text/javascript\0" |
204 "Expires: Thu, 1 Jan 2100 20:00:00 GMT\0" | 204 "Expires: Thu, 1 Jan 2100 20:00:00 GMT\0" |
205 "\0"; | 205 "\0"; |
206 std::string headers(kHeaders, arraysize(kHeaders)); | 206 std::string headers(kHeaders, arraysize(kHeaders)); |
207 return new net::URLRequestTestJob( | 207 return new net::URLRequestTestJob( |
208 request, network_delegate, headers, body_, true); | 208 request, network_delegate, headers, body_, true); |
209 } | 209 } |
210 | 210 |
| 211 net::URLRequestJob* MaybeInterceptResponse( |
| 212 net::URLRequest* request, |
| 213 net::NetworkDelegate* network_delegate) const override { |
| 214 return NULL; |
| 215 } |
| 216 |
| 217 net::URLRequestJob* MaybeInterceptRedirect( |
| 218 net::URLRequest* request, |
| 219 net::NetworkDelegate* network_delegate, |
| 220 const GURL& location) const override { |
| 221 return NULL; |
| 222 } |
| 223 |
211 private: | 224 private: |
212 std::string body_; | 225 std::string body_; |
213 DISALLOW_COPY_AND_ASSIGN(LongLivedResourceInterceptor); | 226 DISALLOW_COPY_AND_ASSIGN(LongLivedResourceInterceptor); |
214 }; | 227 }; |
215 | 228 |
216 void CreateLongLivedResourceInterceptors( | 229 void CreateLongLivedResourceInterceptors( |
217 const GURL& worker_url, const GURL& import_url) { | 230 const GURL& worker_url, const GURL& import_url) { |
218 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 231 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
219 scoped_ptr<net::URLRequestInterceptor> interceptor; | 232 scoped_ptr<net::URLRequestInterceptor> interceptor; |
220 | 233 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 RunOnIOThread( | 951 RunOnIOThread( |
939 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, | 952 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, |
940 this, | 953 this, |
941 embedded_test_server()->GetURL("/service_worker/empty.html"), | 954 embedded_test_server()->GetURL("/service_worker/empty.html"), |
942 &status)); | 955 &status)); |
943 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); | 956 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); |
944 } | 957 } |
945 } | 958 } |
946 | 959 |
947 } // namespace content | 960 } // namespace content |
OLD | NEW |