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

Side by Side Diff: third_party/WebKit/Source/core/events/EventPathTest.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/events/EventPath.h" 5 #include "core/events/EventPath.h"
6 6
7 #include <memory>
7 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
8 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
9 #include "core/dom/PseudoElement.h" 10 #include "core/dom/PseudoElement.h"
10 #include "core/style/ComputedStyleConstants.h" 11 #include "core/style/ComputedStyleConstants.h"
11 #include "core/testing/DummyPageHolder.h" 12 #include "core/testing/DummyPageHolder.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class EventPathTest : public ::testing::Test { 17 class EventPathTest : public ::testing::Test {
18 protected: 18 protected:
19 Document& GetDocument() const { return dummy_page_holder_->GetDocument(); } 19 Document& GetDocument() const { return dummy_page_holder_->GetDocument(); }
20 20
21 private: 21 private:
22 void SetUp() override; 22 void SetUp() override;
23 23
24 std::unique_ptr<DummyPageHolder> dummy_page_holder_; 24 std::unique_ptr<DummyPageHolder> dummy_page_holder_;
25 }; 25 };
26 26
27 void EventPathTest::SetUp() { 27 void EventPathTest::SetUp() {
28 dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600)); 28 dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600));
29 } 29 }
30 30
31 TEST_F(EventPathTest, ShouldBeEmptyForPseudoElementWithoutParentElement) { 31 TEST_F(EventPathTest, ShouldBeEmptyForPseudoElementWithoutParentElement) {
32 Element* div = 32 Element* div =
33 GetDocument().createElement(HTMLNames::divTag, kCreatedByCreateElement); 33 GetDocument().createElement(HTMLNames::divTag, kCreatedByCreateElement);
34 PseudoElement* pseudo = PseudoElement::Create(div, kPseudoIdFirstLetter); 34 PseudoElement* pseudo = PseudoElement::Create(div, kPseudoIdFirstLetter);
35 pseudo->Dispose(); 35 pseudo->Dispose();
36 EventPath event_path(*pseudo); 36 EventPath event_path(*pseudo);
37 EXPECT_TRUE(event_path.IsEmpty()); 37 EXPECT_TRUE(event_path.IsEmpty());
38 } 38 }
39 39
40 } // namespace blink 40 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698