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

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

Issue 2697073002: [ES6 modules] Introduce ModuleScriptLoader (Closed)
Patch Set: 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 "core/CoreExport.h"
10 #include "core/dom/Modulator.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 // DummyModulator provides empty Modulator interface implementation w/
16 // NOTREACHED().
17 //
18 // DummyModulator is useful for unit-testing.
19 // Not all module implementation components require full-blown Modulator
20 // implementation. Unit tests can implement a subset of Modulator interface
21 // which is exercised from unit-under-test.
22 class CORE_EXPORT DummyModulator
23 : public GarbageCollectedFinalized<DummyModulator>,
24 public Modulator {
25 USING_GARBAGE_COLLECTED_MIXIN(DummyModulator);
26
27 public:
28 DummyModulator() = default;
29 virtual ~DummyModulator() {}
30 DEFINE_INLINE_TRACE() {}
31
32 ReferrerPolicy referrerPolicy() override {
33 NOTREACHED();
34 return ReferrerPolicyDefault;
35 }
36
37 ScriptModule compileModule(const String& script,
38 const String& urlStr) override {
39 NOTREACHED();
40 return ScriptModule();
41 }
42 };
43
44 } // namespace blink
45
46 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698