Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / events / EventPathTest.cpp
blob653b0823ed7c2b519848bd7adcf3e9040bbaa7e9
1 // Copyright 2015 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/events/EventPath.h"
8 #include "core/HTMLNames.h"
9 #include "core/dom/Document.h"
10 #include "core/dom/PseudoElement.h"
11 #include "core/style/ComputedStyleConstants.h"
12 #include "core/testing/DummyPageHolder.h"
13 #include <gtest/gtest.h>
15 namespace blink {
17 class EventPathTest : public ::testing::Test {
18 protected:
19 Document& document() const { return m_dummyPageHolder->document(); }
21 private:
22 void SetUp() override;
24 OwnPtr<DummyPageHolder> m_dummyPageHolder;
27 void EventPathTest::SetUp()
29 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
32 TEST_F(EventPathTest, ShouldBeEmptyForPseudoElementWithoutParentElement)
34 RefPtrWillBeRawPtr<Element> div = document().createElement(HTMLNames::divTag, false);
35 RefPtrWillBeRawPtr<PseudoElement> pseudo = PseudoElement::create(div.get(), FIRST_LETTER);
36 pseudo->dispose();
37 EventPath eventPath(*pseudo);
38 EXPECT_TRUE(eventPath.isEmpty());
41 } // namespace blink