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 "config.h" | 5 #include "config.h" |
6 #include "modules/serviceworkers/ServiceWorkerContainer.h" | 6 #include "modules/serviceworkers/ServiceWorkerContainer.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "bindings/core/v8/ScriptFunction.h" | 9 #include "bindings/core/v8/ScriptFunction.h" |
10 #include "bindings/core/v8/ScriptPromise.h" | 10 #include "bindings/core/v8/ScriptPromise.h" |
11 #include "bindings/core/v8/ScriptState.h" | 11 #include "bindings/core/v8/ScriptState.h" |
12 #include "bindings/core/v8/V8DOMException.h" | 12 #include "bindings/core/v8/V8DOMException.h" |
13 #include "bindings/core/v8/V8GCController.h" | 13 #include "bindings/core/v8/V8GCController.h" |
14 #include "core/dom/DOMException.h" | 14 #include "core/dom/DOMException.h" |
15 #include "core/dom/Document.h" | 15 #include "core/dom/Document.h" |
16 #include "core/dom/ExecutionContext.h" | 16 #include "core/dom/ExecutionContext.h" |
17 #include "core/testing/DummyPageHolder.h" | 17 #include "core/testing/DummyPageHolder.h" |
18 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" | 18 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
19 #include "platform/weborigin/KURL.h" | 19 #include "platform/weborigin/KURL.h" |
20 #include "platform/weborigin/SecurityOrigin.h" | 20 #include "platform/weborigin/SecurityOrigin.h" |
21 #include "public/platform/WebServiceWorkerProvider.h" | 21 #include "public/platform/WebServiceWorkerProvider.h" |
22 #include "public/platform/WebURL.h" | 22 #include "public/platform/WebURL.h" |
23 #include "wtf/OwnPtr.h" | 23 #include "wtf/OwnPtr.h" |
24 #include "wtf/PassOwnPtr.h" | 24 #include "wtf/PassOwnPtr.h" |
25 #include "wtf/text/WTFString.h" | 25 #include "wtf/text/WTFString.h" |
26 #include <gtest/gtest.h> | 26 #include <gtest/gtest.h> |
27 #include <v8.h> | 27 #include <v8.h> |
28 | 28 |
29 using namespace blink; | 29 namespace blink { |
30 | |
31 namespace { | 30 namespace { |
32 | 31 |
33 // Promise-related test support. | 32 // Promise-related test support. |
34 | 33 |
35 struct StubScriptFunction { | 34 struct StubScriptFunction { |
36 public: | 35 public: |
37 StubScriptFunction() | 36 StubScriptFunction() |
38 : m_callCount(0) | 37 : m_callCount(0) |
39 { | 38 { |
40 } | 39 } |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 container->unregisterServiceWorker(scriptState(), "y/"); | 334 container->unregisterServiceWorker(scriptState(), "y/"); |
336 | 335 |
337 EXPECT_EQ(1ul, stubProvider.unregisterCallCount()); | 336 EXPECT_EQ(1ul, stubProvider.unregisterCallCount()); |
338 EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/y/")), stubProvider.un
registerScope()); | 337 EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/y/")), stubProvider.un
registerScope()); |
339 } | 338 } |
340 | 339 |
341 container->willBeDetachedFromFrame(); | 340 container->willBeDetachedFromFrame(); |
342 } | 341 } |
343 | 342 |
344 } // namespace | 343 } // namespace |
| 344 } // namespace blink |
OLD | NEW |