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/CustomElementRegistry.h" | 5 #include "core/dom/custom/CustomElementRegistry.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
8 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
9 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
10 #include "core/dom/ElementDefinitionOptions.h" | 11 #include "core/dom/ElementDefinitionOptions.h" |
11 #include "core/dom/custom/CEReactionsScope.h" | 12 #include "core/dom/custom/CEReactionsScope.h" |
12 #include "core/dom/custom/CustomElementDefinition.h" | 13 #include "core/dom/custom/CustomElementDefinition.h" |
13 #include "core/dom/custom/CustomElementDefinitionBuilder.h" | 14 #include "core/dom/custom/CustomElementDefinitionBuilder.h" |
14 #include "core/dom/custom/CustomElementDescriptor.h" | 15 #include "core/dom/custom/CustomElementDescriptor.h" |
15 #include "core/dom/custom/CustomElementTestHelpers.h" | 16 #include "core/dom/custom/CustomElementTestHelpers.h" |
16 #include "core/dom/shadow/ShadowRoot.h" | 17 #include "core/dom/shadow/ShadowRoot.h" |
17 #include "core/dom/shadow/ShadowRootInit.h" | 18 #include "core/dom/shadow/ShadowRootInit.h" |
18 #include "core/testing/DummyPageHolder.h" | 19 #include "core/testing/DummyPageHolder.h" |
19 #include "platform/ScriptForbiddenScope.h" | 20 #include "platform/ScriptForbiddenScope.h" |
20 #include "platform/heap/Handle.h" | 21 #include "platform/heap/Handle.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "wtf/text/AtomicString.h" | 23 #include "wtf/text/AtomicString.h" |
23 #include <memory> | |
24 | 24 |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 class CustomElementRegistryTest : public ::testing::Test { | 27 class CustomElementRegistryTest : public ::testing::Test { |
28 protected: | 28 protected: |
29 void SetUp() { | 29 void SetUp() { |
30 m_page.reset(DummyPageHolder::create(IntSize(1, 1)).release()); | 30 m_page.reset(DummyPageHolder::create(IntSize(1, 1)).release()); |
31 } | 31 } |
32 | 32 |
33 void TearDown() { m_page = nullptr; } | 33 void TearDown() { m_page = nullptr; } |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 EXPECT_EQ(definitionB, definition); | 438 EXPECT_EQ(definitionB, definition); |
439 // look up undefined customized built-in element | 439 // look up undefined customized built-in element |
440 definition = registry().definitionFor(CustomElementDescriptor("a-a", "div")); | 440 definition = registry().definitionFor(CustomElementDescriptor("a-a", "div")); |
441 EXPECT_EQ(nullptr, definition) << "a-a, div should not be registered"; | 441 EXPECT_EQ(nullptr, definition) << "a-a, div should not be registered"; |
442 } | 442 } |
443 | 443 |
444 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 444 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
445 // extensions are implemented. | 445 // extensions are implemented. |
446 | 446 |
447 } // namespace blink | 447 } // namespace blink |
OLD | NEW |