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

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

Issue 2704323002: [ES6 modules] Introduce ModuleMap (Closed)
Patch Set: hiroshige review / rebased 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 "core/CoreExport.h"
9 #include "core/dom/Modulator.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class ModuleScriptLoaderClient;
15 class ScriptModuleResolver;
16 class WebTaskRunner;
17 class ModuleScriptFetchRequest;
18
19 // DummyModulator provides empty Modulator interface implementation w/
20 // NOTREACHED().
21 //
22 // DummyModulator is useful for unit-testing.
23 // Not all module implementation components require full-blown Modulator
24 // implementation. Unit tests can implement a subset of Modulator interface
25 // which is exercised from unit-under-test.
26 class CORE_EXPORT DummyModulator
27 : public GarbageCollectedFinalized<DummyModulator>,
28 public Modulator {
29 USING_GARBAGE_COLLECTED_MIXIN(DummyModulator);
30
31 public:
32 DummyModulator() = default;
33 virtual ~DummyModulator() {}
34 DEFINE_INLINE_TRACE() {}
35
36 ScriptModuleResolver* scriptModuleResolver() override {
37 NOTREACHED();
38 return nullptr;
39 }
40
41 WebTaskRunner* taskRunner() override {
42 NOTREACHED();
43 return nullptr;
44 };
45
46 void fetchNewSingleModule(const ModuleScriptFetchRequest&,
47 ModuleGraphLevel,
48 ModuleScriptLoaderClient*) override {
49 NOTREACHED();
50 }
51 };
52
53 } // namespace blink
54
55 #endif
yhirano 2017/02/22 09:10:42 // DummyModulator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698