| 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/CustomElementReactionStack.h" | 5 #include "core/dom/custom/CustomElementReactionStack.h" |
| 6 | 6 |
| 7 #include "core/dom/custom/CustomElementReaction.h" | 7 #include "core/dom/custom/CustomElementReaction.h" |
| 8 #include "core/dom/custom/CustomElementReactionTestHelpers.h" | 8 #include "core/dom/custom/CustomElementReactionTestHelpers.h" |
| 9 #include "core/dom/custom/CustomElementTestHelpers.h" | 9 #include "core/dom/custom/CustomElementTestHelpers.h" |
| 10 #include "core/html/HTMLDocument.h" | |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "wtf/text/AtomicString.h" | 11 #include "wtf/text/AtomicString.h" |
| 13 #include <initializer_list> | 12 #include <initializer_list> |
| 14 #include <vector> | 13 #include <vector> |
| 15 | 14 |
| 16 namespace blink { | 15 namespace blink { |
| 17 | 16 |
| 18 TEST(CustomElementReactionStackTest, one) | 17 TEST(CustomElementReactionStackTest, one) |
| 19 { | 18 { |
| 20 std::vector<char> log; | 19 std::vector<char> log; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 stack->enqueueToCurrentQueue(element, new TestReaction({ | 148 stack->enqueueToCurrentQueue(element, new TestReaction({ |
| 150 new EnqueueToStack(stack, element, | 149 new EnqueueToStack(stack, element, |
| 151 new TestReaction({ new Log('a', log) }) ) | 150 new TestReaction({ new Log('a', log) }) ) |
| 152 })); | 151 })); |
| 153 stack->popInvokingReactions(); | 152 stack->popInvokingReactions(); |
| 154 | 153 |
| 155 EXPECT_EQ(log, std::vector<char>({ 'a' })) << "enqueued reaction from anothe
r reaction should run in the same invoke"; | 154 EXPECT_EQ(log, std::vector<char>({ 'a' })) << "enqueued reaction from anothe
r reaction should run in the same invoke"; |
| 156 } | 155 } |
| 157 | 156 |
| 158 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |