| 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)).leakPtr()); | 74 m_page.reset(DummyPageHolder::create(IntSize(1, 1)).release()); |
| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 EXPECT_EQ(1u, definition->m_invocationCount) | 316 EXPECT_EQ(1u, definition->m_invocationCount) |
| 317 << "defining the element should have 'upgraded' the existing element"; | 317 << "defining the element should have 'upgraded' the existing element"; |
| 318 EXPECT_EQ(element, definition->m_element) | 318 EXPECT_EQ(element, definition->m_element) |
| 319 << "the existing a-a element should have been upgraded"; | 319 << "the existing a-a element should have been upgraded"; |
| 320 } | 320 } |
| 321 | 321 |
| 322 // TODO(dominicc): Add tests which adjust the "is" attribute when type | 322 // TODO(dominicc): Add tests which adjust the "is" attribute when type |
| 323 // extensions are implemented. | 323 // extensions are implemented. |
| 324 | 324 |
| 325 } // namespace blink | 325 } // namespace blink |
| OLD | NEW |