OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/dom/custom/CustomElementUpgradeSorter.h" | 5 #include "core/dom/custom/CustomElementUpgradeSorter.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
8 #include "bindings/core/v8/StringOrDictionary.h" | 9 #include "bindings/core/v8/StringOrDictionary.h" |
9 #include "core/HTMLNames.h" | 10 #include "core/HTMLNames.h" |
10 #include "core/dom/Document.h" | 11 #include "core/dom/Document.h" |
11 #include "core/dom/Element.h" | 12 #include "core/dom/Element.h" |
12 #include "core/dom/shadow/ShadowRoot.h" | 13 #include "core/dom/shadow/ShadowRoot.h" |
13 #include "core/dom/shadow/ShadowRootInit.h" | 14 #include "core/dom/shadow/ShadowRootInit.h" |
14 #include "core/html/HTMLDocument.h" | 15 #include "core/html/HTMLDocument.h" |
15 #include "core/testing/DummyPageHolder.h" | 16 #include "core/testing/DummyPageHolder.h" |
16 #include "platform/heap/Handle.h" | 17 #include "platform/heap/Handle.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "wtf/text/AtomicString.h" | 19 #include "wtf/text/AtomicString.h" |
19 #include <memory> | |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 class CustomElementUpgradeSorterTest : public ::testing::Test { | 23 class CustomElementUpgradeSorterTest : public ::testing::Test { |
24 protected: | 24 protected: |
25 void SetUp() override { m_page = DummyPageHolder::create(IntSize(1, 1)); } | 25 void SetUp() override { m_page = DummyPageHolder::create(IntSize(1, 1)); } |
26 | 26 |
27 void TearDown() override { m_page = nullptr; } | 27 void TearDown() override { m_page = nullptr; } |
28 | 28 |
29 Element* createElementWithId(const char* localName, const char* id) { | 29 Element* createElementWithId(const char* localName, const char* id) { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 sort.sorted(&elements, document()); | 205 sort.sorted(&elements, document()); |
206 EXPECT_EQ(3u, elements.size()); | 206 EXPECT_EQ(3u, elements.size()); |
207 EXPECT_EQ(a, elements[0].get()); | 207 EXPECT_EQ(a, elements[0].get()); |
208 EXPECT_EQ(c, elements[1].get()); | 208 EXPECT_EQ(c, elements[1].get()); |
209 EXPECT_EQ(d, elements[2].get()); | 209 EXPECT_EQ(d, elements[2].get()); |
210 } | 210 } |
211 | 211 |
212 // TODO(kochi): Add test cases which uses HTML imports. | 212 // TODO(kochi): Add test cases which uses HTML imports. |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
OLD | NEW |