Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/crashes/focus-navigation-infinite-loop.html

Issue 2562753003: Fix focus navigation getting stuck (Closed)
Patch Set: Refactor ScopedFocusNavigation class. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/crashes/focus-navigation-infinite-loop.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/crashes/focus-navigation-infinite-loop.html b/third_party/WebKit/LayoutTests/shadow-dom/crashes/focus-navigation-infinite-loop.html
new file mode 100644
index 0000000000000000000000000000000000000000..31410db98e3427f6858c52df4e264194108bb885
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/crashes/focus-navigation-infinite-loop.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src='../../resources/testharness.js'></script>
+<script src='../../resources/testharnessreport.js'></script>
+<script src='../resources/shadow-dom.js'></script>
+<script src='../resources/focus-utils.js'></script>
+<body>
+ <input id="input-before">
+ <div id="host" tabindex="0">
+ <template>
+ <span>x-element</span>
+ <slot tabindex="1"></slot>
+ </template> </div>
+ <input id="input-after">
+</body>
+<script>
+'use strict';
+
+test(() => {
+ let host = document.querySelector('#host');
+ convertTemplatesToShadowRootsWithin(host);
+ let elements = [
+ 'input-before',
+ 'host',
+ 'input-after'
+ ];
+ assert_focus_navigation_forward(elements);
+ elements.reverse();
+ assert_focus_navigation_backward(elements);
+}, 'Focus navigation should not get stuck.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698