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/shadow/SlotScopedTraversal.h" | 5 #include "core/dom/shadow/SlotScopedTraversal.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/Node.h" | 11 #include "core/dom/Node.h" |
11 #include "core/dom/NodeTraversal.h" | 12 #include "core/dom/NodeTraversal.h" |
12 #include "core/dom/shadow/ShadowRoot.h" | 13 #include "core/dom/shadow/ShadowRoot.h" |
13 #include "core/html/HTMLElement.h" | 14 #include "core/html/HTMLElement.h" |
14 #include "core/html/HTMLSlotElement.h" | 15 #include "core/html/HTMLSlotElement.h" |
15 #include "core/testing/DummyPageHolder.h" | 16 #include "core/testing/DummyPageHolder.h" |
16 #include "platform/geometry/IntSize.h" | 17 #include "platform/geometry/IntSize.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "wtf/Vector.h" | 19 #include "wtf/Vector.h" |
19 #include <memory> | |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 class SlotScopedTraversalTest : public ::testing::Test { | 23 class SlotScopedTraversalTest : public ::testing::Test { |
24 protected: | 24 protected: |
25 Document& document() const; | 25 Document& document() const; |
26 | 26 |
27 void setupSampleHTML(const char* mainHTML, const char* shadowHTML, unsigned); | 27 void setupSampleHTML(const char* mainHTML, const char* shadowHTML, unsigned); |
28 void attachOpenShadowRoot(Element& shadowHost, const char* shadowInnerHTML); | 28 void attachOpenShadowRoot(Element& shadowHost, const char* shadowInnerHTML); |
29 void testExpectedSequence(const Vector<Element*>& list); | 29 void testExpectedSequence(const Vector<Element*>& list); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 const Vector<Element*> expectedSequence({inner[0], child[0], span[0], | 401 const Vector<Element*> expectedSequence({inner[0], child[0], span[0], |
402 child[1], span[1], inner[1], | 402 child[1], span[1], inner[1], |
403 child[2], span[2], child[3]}); | 403 child[2], span[2], child[3]}); |
404 testExpectedSequence(expectedSequence); | 404 testExpectedSequence(expectedSequence); |
405 } break; | 405 } break; |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 } // namespace blink | 410 } // namespace blink |
OLD | NEW |