| 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_request_handler.h" | 5 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/browser/fileapi/mock_url_request_delegate.h" | |
| 11 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 10 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
| 12 #include "content/browser/service_worker/service_worker_context_core.h" | 11 #include "content/browser/service_worker/service_worker_context_core.h" |
| 13 #include "content/browser/service_worker/service_worker_provider_host.h" | 12 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 14 #include "content/browser/service_worker/service_worker_registration.h" | 13 #include "content/browser/service_worker/service_worker_registration.h" |
| 15 #include "content/common/resource_request_body_impl.h" | 14 #include "content/common/resource_request_body_impl.h" |
| 16 #include "content/common/service_worker/service_worker_utils.h" | 15 #include "content/common/service_worker/service_worker_utils.h" |
| 17 #include "content/public/common/request_context_frame_type.h" | 16 #include "content/public/common/request_context_frame_type.h" |
| 18 #include "content/public/common/request_context_type.h" | 17 #include "content/public/common/request_context_type.h" |
| 19 #include "content/public/common/resource_type.h" | 18 #include "content/public/common/resource_type.h" |
| 20 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
| 21 #include "net/url_request/url_request_context.h" | 20 #include "net/url_request/url_request_context.h" |
| 22 #include "storage/browser/blob/blob_storage_context.h" | 21 #include "storage/browser/blob/blob_storage_context.h" |
| 22 #include "storage/browser/test/mock_url_request_delegate.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 int kMockProviderId = 1; | 29 int kMockProviderId = 1; |
| 30 | 30 |
| 31 void EmptyCallback() { | 31 void EmptyCallback() { |
| 32 } | 32 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 provider_host_->SetDocumentUrl(GURL("")); | 157 provider_host_->SetDocumentUrl(GURL("")); |
| 158 EXPECT_FALSE(InitializeHandlerCheck( | 158 EXPECT_FALSE(InitializeHandlerCheck( |
| 159 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); | 159 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); |
| 160 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); | 160 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); |
| 161 EXPECT_FALSE(InitializeHandlerCheck( | 161 EXPECT_FALSE(InitializeHandlerCheck( |
| 162 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); | 162 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); |
| 163 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); | 163 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace content | 166 } // namespace content |
| OLD | NEW |