Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / testing / NullExecutionContext.cpp
blob1f80b2605e3a2fe9ecae48840e0308c1ea1ae812
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
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "core/testing/NullExecutionContext.h"
8 #include "core/dom/ExecutionContextTask.h"
9 #include "core/events/Event.h"
10 #include "core/frame/DOMTimer.h"
12 namespace blink {
14 namespace {
16 class NullEventQueue final : public EventQueue {
17 public:
18 NullEventQueue() { }
19 ~NullEventQueue() override { }
20 bool enqueueEvent(PassRefPtrWillBeRawPtr<Event>) override { return true; }
21 bool cancelEvent(Event*) override { return true; }
22 void close() override { }
25 } // namespace
27 NullExecutionContext::NullExecutionContext()
28 : m_tasksNeedSuspension(false)
29 , m_queue(adoptPtrWillBeNoop(new NullEventQueue()))
33 void NullExecutionContext::postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>)
37 double NullExecutionContext::timerAlignmentInterval() const
39 return DOMTimer::visiblePageAlignmentInterval();
42 bool NullExecutionContext::isPrivilegedContext(String& errorMessage, const PrivilegeContextCheck privilegeContextCheck) const
44 return true;
47 } // namespace blink