| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "modules/serviceworkers/ServiceWorkerContainer.h" | 6 #include "modules/serviceworkers/ServiceWorkerContainer.h" |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "bindings/core/v8/Dictionary.h" | 11 #include "bindings/core/v8/Dictionary.h" |
| 12 #include "bindings/core/v8/ScriptFunction.h" | 12 #include "bindings/core/v8/ScriptFunction.h" |
| 13 #include "bindings/core/v8/ScriptPromise.h" | 13 #include "bindings/core/v8/ScriptPromise.h" |
| 14 #include "bindings/core/v8/ScriptState.h" | 14 #include "bindings/core/v8/ScriptState.h" |
| 15 #include "bindings/core/v8/V8Binding.h" | 15 #include "bindings/core/v8/V8Binding.h" |
| 16 #include "bindings/core/v8/V8DOMException.h" | 16 #include "bindings/core/v8/V8DOMException.h" |
| 17 #include "bindings/core/v8/V8GCController.h" | 17 #include "bindings/core/v8/V8GCController.h" |
| 18 #include "core/dom/DOMException.h" | 18 #include "core/dom/DOMException.h" |
| 19 #include "core/dom/Document.h" | 19 #include "core/dom/Document.h" |
| 20 #include "core/dom/ExecutionContext.h" | 20 #include "core/dom/ExecutionContext.h" |
| 21 #include "core/page/FocusController.h" | 21 #include "core/page/FocusController.h" |
| 22 #include "core/testing/DummyPageHolder.h" | 22 #include "core/testing/DummyPageHolder.h" |
| 23 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 23 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
| 24 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" | 24 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
| 25 #include "platform/weborigin/KURL.h" | 25 #include "platform/weborigin/KURL.h" |
| 26 #include "platform/weborigin/SecurityOrigin.h" | 26 #include "platform/weborigin/SecurityOrigin.h" |
| 27 #include "platform/wtf/PtrUtil.h" |
| 28 #include "platform/wtf/text/WTFString.h" |
| 27 #include "public/platform/WebURL.h" | 29 #include "public/platform/WebURL.h" |
| 28 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 30 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
| 29 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 31 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 31 #include "v8/include/v8.h" | 33 #include "v8/include/v8.h" |
| 32 #include "wtf/PtrUtil.h" | |
| 33 #include "wtf/text/WTFString.h" | |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 // Promise-related test support. | 38 // Promise-related test support. |
| 39 | 39 |
| 40 struct StubScriptFunction { | 40 struct StubScriptFunction { |
| 41 public: | 41 public: |
| 42 StubScriptFunction() : call_count_(0) {} | 42 StubScriptFunction() : call_count_(0) {} |
| 43 | 43 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 ScriptState::Scope script_scope(GetScriptState()); | 374 ScriptState::Scope script_scope(GetScriptState()); |
| 375 container->getRegistration(GetScriptState(), ""); | 375 container->getRegistration(GetScriptState(), ""); |
| 376 EXPECT_EQ(1ul, stub_provider.GetRegistrationCallCount()); | 376 EXPECT_EQ(1ul, stub_provider.GetRegistrationCallCount()); |
| 377 EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/index.html")), | 377 EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/index.html")), |
| 378 stub_provider.GetRegistrationURL()); | 378 stub_provider.GetRegistrationURL()); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace | 382 } // namespace |
| 383 } // namespace blink | 383 } // namespace blink |
| OLD | NEW |