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/page/FocusController.h" | 5 #include "core/page/FocusController.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/dom/shadow/ShadowRootInit.h" | 8 #include "core/dom/shadow/ShadowRootInit.h" |
8 #include "core/html/HTMLElement.h" | 9 #include "core/html/HTMLElement.h" |
9 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include <memory> | |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class FocusControllerTest : public testing::Test { | 15 class FocusControllerTest : public testing::Test { |
16 public: | 16 public: |
17 Document& document() const { return m_pageHolder->document(); } | 17 Document& document() const { return m_pageHolder->document(); } |
18 FocusController& focusController() const { | 18 FocusController& focusController() const { |
19 return document().page()->focusController(); | 19 return document().page()->focusController(); |
20 } | 20 } |
21 | 21 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Set sequential focus navigation point at text node. | 78 // Set sequential focus navigation point at text node. |
79 document().setSequentialFocusNavigationStartingPoint(text); | 79 document().setSequentialFocusNavigationStartingPoint(text); |
80 | 80 |
81 focusController().advanceFocus(WebFocusTypeBackward); | 81 focusController().advanceFocus(WebFocusTypeBackward); |
82 EXPECT_EQ(target, document().focusedElement()) | 82 EXPECT_EQ(target, document().focusedElement()) |
83 << "This should not hit assertion and finish properly."; | 83 << "This should not hit assertion and finish properly."; |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |