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 "content/browser/service_worker/service_worker_url_request_job.h" | 5 #include "content/browser/service_worker/service_worker_url_request_job.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 EXPECT_TRUE(http_info.ssl_info.is_valid()); | 174 EXPECT_TRUE(http_info.ssl_info.is_valid()); |
175 http_info.ssl_info.security_bits = 0x100; | 175 http_info.ssl_info.security_bits = 0x100; |
176 // SSL3 TLS_DHE_RSA_WITH_AES_256_CBC_SHA | 176 // SSL3 TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
177 http_info.ssl_info.connection_status = 0x300039; | 177 http_info.ssl_info.connection_status = 0x300039; |
178 version_->SetMainScriptHttpResponseInfo(http_info); | 178 version_->SetMainScriptHttpResponseInfo(http_info); |
179 } | 179 } |
180 | 180 |
181 std::unique_ptr<ServiceWorkerProviderHost> provider_host( | 181 std::unique_ptr<ServiceWorkerProviderHost> provider_host( |
182 new ServiceWorkerProviderHost( | 182 new ServiceWorkerProviderHost( |
183 helper_->mock_render_process_id(), MSG_ROUTING_NONE, kProviderID, | 183 helper_->mock_render_process_id(), MSG_ROUTING_NONE, kProviderID, |
184 SERVICE_WORKER_PROVIDER_FOR_WINDOW, helper_->context()->AsWeakPtr(), | 184 SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
| 185 true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr(), |
185 nullptr)); | 186 nullptr)); |
186 provider_host_ = provider_host->AsWeakPtr(); | 187 provider_host_ = provider_host->AsWeakPtr(); |
187 provider_host->SetDocumentUrl(GURL("http://example.com/")); | 188 provider_host->SetDocumentUrl(GURL("http://example.com/")); |
188 registration_->SetActiveVersion(version_); | 189 registration_->SetActiveVersion(version_); |
189 provider_host->AssociateRegistration(registration_.get(), | 190 provider_host->AssociateRegistration(registration_.get(), |
190 false /* notify_controllerchange */); | 191 false /* notify_controllerchange */); |
191 | 192 |
192 ChromeBlobStorageContext* chrome_blob_storage_context = | 193 ChromeBlobStorageContext* chrome_blob_storage_context = |
193 ChromeBlobStorageContext::GetFor(browser_context_.get()); | 194 ChromeBlobStorageContext::GetFor(browser_context_.get()); |
194 // Wait for chrome_blob_storage_context to finish initializing. | 195 // Wait for chrome_blob_storage_context to finish initializing. |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 EXPECT_EQ(blink::WebServiceWorkerResponseTypeDefault, | 866 EXPECT_EQ(blink::WebServiceWorkerResponseTypeDefault, |
866 info->response_type_via_service_worker()); | 867 info->response_type_via_service_worker()); |
867 EXPECT_FALSE(info->service_worker_start_time().is_null()); | 868 EXPECT_FALSE(info->service_worker_start_time().is_null()); |
868 EXPECT_FALSE(info->service_worker_ready_time().is_null()); | 869 EXPECT_FALSE(info->service_worker_ready_time().is_null()); |
869 } | 870 } |
870 | 871 |
871 // TODO(kinuko): Add more tests with different response data and also for | 872 // TODO(kinuko): Add more tests with different response data and also for |
872 // FallbackToNetwork case. | 873 // FallbackToNetwork case. |
873 | 874 |
874 } // namespace content | 875 } // namespace content |
OLD | NEW |