Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: third_party/WebKit/Source/core/testing/DummyModulator.h

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: snapshot Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DummyModulator_h
6 #define DummyModulator_h
7
8 #include "bindings/core/v8/ScriptModule.h"
9 #include "bindings/core/v8/ScriptValue.h"
10 #include "core/CoreExport.h"
11 #include "core/dom/Modulator.h"
12 #include "platform/heap/Handle.h"
13 #include "wtf/Vector.h"
14
15 namespace blink {
16
17 class ModuleScript;
18 class ModuleScriptLoaderClient;
19 class ScriptModuleResolver;
20 class WebTaskRunner;
21 class ModuleScriptFetchRequest;
22
23 // DummyModulator provides empty Modulator interface implementation w/
24 // NOTREACHED().
25 //
26 // DummyModulator is useful for unit-testing.
27 // Not all module implementation components require full-blown Modulator
28 // implementation. Unit tests can implement a subset of Modulator interface
29 // which is exercised from unit-under-test.
30 class CORE_EXPORT DummyModulator
31 : public GarbageCollectedFinalized<DummyModulator>,
32 public Modulator {
33 USING_GARBAGE_COLLECTED_MIXIN(DummyModulator);
34
35 public:
36 DummyModulator() = default;
37 virtual ~DummyModulator() {}
38 DEFINE_INLINE_TRACE() {}
39
40 ScriptModuleResolver* scriptModuleResolver() override {
41 NOTREACHED();
42 return nullptr;
43 }
44
45 WebTaskRunner* taskRunner() override {
46 NOTREACHED();
47 return nullptr;
48 };
49
50 ExecutionContext* executionContext() override {
51 NOTREACHED();
52 return nullptr;
53 }
54
55 ReferrerPolicy referrerPolicy() override {
56 NOTREACHED();
57 return ReferrerPolicyDefault;
58 }
59
60 void fetchTree(const ModuleScriptFetchRequest&, ModuleTreeClient*) override {
61 NOTREACHED();
62 }
63
64 void fetchTreeInternal(const ModuleScriptFetchRequest&,
65 const AncestorList&,
66 ModuleGraphLevel,
67 ModuleTreeClient*) override {
68 NOTREACHED();
69 }
70
71 void fetchSingle(const ModuleScriptFetchRequest&,
72 ModuleGraphLevel,
73 SingleModuleClient*) override {
74 NOTREACHED();
75 }
76
77 void fetchNewSingleModule(const ModuleScriptFetchRequest&,
78 ModuleGraphLevel,
79 ModuleScriptLoaderClient*) override {
80 NOTREACHED();
81 }
82
83 ModuleScript* retrieveFetchedModuleScript(const KURL&) override {
84 NOTREACHED();
85 return nullptr;
86 }
87
88 ScriptModule compileModule(const String& script,
89 const String& urlStr) override {
90 NOTREACHED();
91 return ScriptModule();
92 }
93
94 ScriptValue instantiateModule(ScriptModule) override {
95 NOTREACHED();
96 return ScriptValue();
97 }
98
99 Vector<String> moduleRequestsFromScriptModule(ScriptModule) override {
100 NOTREACHED();
101 return Vector<String>();
102 }
103
104 void executeModule(ScriptModule) override { NOTREACHED(); }
105 };
106
107 } // namespace blink
108
109 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp ('k') | threejs-bootstrap.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698