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/CustomElementsRegistry.h" | 5 #include "core/dom/custom/CustomElementsRegistry.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "bindings/core/v8/ScriptValue.h" | 8 #include "bindings/core/v8/ScriptValue.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 private: | 64 private: |
65 Persistent<Document> m_document; | 65 Persistent<Document> m_document; |
66 Persistent<CustomElementsRegistry> m_registry; | 66 Persistent<CustomElementsRegistry> m_registry; |
67 }; | 67 }; |
68 | 68 |
69 class CustomElementsRegistryFrameTest : public CustomElementsRegistryTestBase { | 69 class CustomElementsRegistryFrameTest : public CustomElementsRegistryTestBase { |
70 protected: | 70 protected: |
71 void SetUp() override | 71 void SetUp() override |
72 { | 72 { |
73 CustomElementsRegistryTestBase::SetUp(); | 73 CustomElementsRegistryTestBase::SetUp(); |
74 m_page.reset(DummyPageHolder::create(IntSize(1, 1)).release()); | 74 m_page.reset(DummyPageHolder::create(IntSize(1, 1)).leakPtr()); |
75 } | 75 } |
76 | 76 |
77 void TearDown() override | 77 void TearDown() override |
78 { | 78 { |
79 m_page = nullptr; | 79 m_page = nullptr; |
80 CustomElementsRegistryTestBase::TearDown(); | 80 CustomElementsRegistryTestBase::TearDown(); |
81 } | 81 } |
82 | 82 |
83 Document& document() override { return m_page->document(); } | 83 Document& document() override { return m_page->document(); } |
84 | 84 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 << "remove() should invoke disconnectedCallback"; | 461 << "remove() should invoke disconnectedCallback"; |
462 | 462 |
463 EXPECT_EQ(1u, definition->m_logs.size()) | 463 EXPECT_EQ(1u, definition->m_logs.size()) |
464 << "remove() should not invoke other callbacks"; | 464 << "remove() should not invoke other callbacks"; |
465 } | 465 } |
466 | 466 |
467 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 467 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
468 // extensions are implemented. | 468 // extensions are implemented. |
469 | 469 |
470 } // namespace blink | 470 } // namespace blink |
OLD | NEW |