| 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 "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "content/browser/fileapi/mock_url_request_delegate.h" | 8 #include "content/browser/fileapi/mock_url_request_delegate.h" |
| 9 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 9 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
| 10 #include "content/browser/service_worker/service_worker_context_core.h" | 10 #include "content/browser/service_worker/service_worker_context_core.h" |
| 11 #include "content/browser/service_worker/service_worker_provider_host.h" | 11 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 12 #include "content/browser/service_worker/service_worker_registration.h" | 12 #include "content/browser/service_worker/service_worker_registration.h" |
| 13 #include "content/browser/service_worker/service_worker_utils.h" | 13 #include "content/browser/service_worker/service_worker_utils.h" |
| 14 #include "content/common/resource_request_body.h" | 14 #include "content/common/resource_request_body.h" |
| 15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 #include "net/url_request/url_request_context.h" | 16 #include "net/url_request/url_request_context.h" |
| 17 #include "storage/browser/blob/blob_storage_context.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "webkit/browser/blob/blob_storage_context.h" | |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 int kMockRenderProcessId = 1224; | 24 int kMockRenderProcessId = 1224; |
| 25 int kMockProviderId = 1; | 25 int kMockProviderId = 1; |
| 26 | 26 |
| 27 void EmptyCallback() { | 27 void EmptyCallback() { |
| 28 } | 28 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 provider_host_->SetDocumentUrl(GURL("")); | 141 provider_host_->SetDocumentUrl(GURL("")); |
| 142 EXPECT_FALSE(InitializeHandlerCheck( | 142 EXPECT_FALSE(InitializeHandlerCheck( |
| 143 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); | 143 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); |
| 144 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); | 144 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); |
| 145 EXPECT_FALSE(InitializeHandlerCheck( | 145 EXPECT_FALSE(InitializeHandlerCheck( |
| 146 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); | 146 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); |
| 147 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); | 147 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace content | 150 } // namespace content |
| OLD | NEW |