OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> |
5 #include "core/HTMLNames.h" | 6 #include "core/HTMLNames.h" |
6 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
7 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
8 #include "core/dom/ElementTraversal.h" | 9 #include "core/dom/ElementTraversal.h" |
9 #include "core/dom/NodeComputedStyle.h" | 10 #include "core/dom/NodeComputedStyle.h" |
10 #include "core/dom/StyleEngine.h" | 11 #include "core/dom/StyleEngine.h" |
11 #include "core/frame/FrameView.h" | 12 #include "core/frame/FrameView.h" |
12 #include "core/html/HTMLElement.h" | 13 #include "core/html/HTMLElement.h" |
13 #include "core/testing/DummyPageHolder.h" | 14 #include "core/testing/DummyPageHolder.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include <memory> | |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 using namespace HTMLNames; | 19 using namespace HTMLNames; |
20 | 20 |
21 class AffectedByFocusTest : public ::testing::Test { | 21 class AffectedByFocusTest : public ::testing::Test { |
22 protected: | 22 protected: |
23 struct ElementResult { | 23 struct ElementResult { |
24 const blink::HTMLQualifiedName tag; | 24 const blink::HTMLQualifiedName tag; |
25 bool affectedBy; | 25 bool affectedBy; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 document().getElementById("d")->focus(); | 305 document().getElementById("d")->focus(); |
306 document().view()->updateAllLifecyclePhases(); | 306 document().view()->updateAllLifecyclePhases(); |
307 | 307 |
308 unsigned elementCount = | 308 unsigned elementCount = |
309 document().styleEngine().styleForElementCount() - startCount; | 309 document().styleEngine().styleForElementCount() - startCount; |
310 | 310 |
311 ASSERT_EQ(1U, elementCount); | 311 ASSERT_EQ(1U, elementCount); |
312 } | 312 } |
313 | 313 |
314 } // namespace blink | 314 } // namespace blink |
OLD | NEW |