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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested.html

Issue 2432293002: Fix focus navigation for nested slot case (Closed)
Patch Set: More references Created 4 years, 1 month 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/LayoutTests/shadow-dom/focus-navigation-slot-nested-2levels.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested.html b/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested.html
new file mode 100644
index 0000000000000000000000000000000000000000..ee84bcd2fdef2183748afa04a109139e5e6c5e66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested.html
@@ -0,0 +1,48 @@
+<!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>
+<div id="log"></div>
+<!--
+This test case is based on the crbug.com/618587 reproduction case:
+http://jsbin.com/bonudiwagu/1/edit?html,output
+-->
+<input id='i0'>
+<div id='x-foo'>
+ <template data-mode='open'>
+ <input id='inner-before'>
+ <slot></slot>
+ <input id='inner-after'>
+ </template>
+ <div id='nested'>
+ <template data-mode='open'>
+ <input id='nested-x'>
+ <slot></slot>
+ <input id='nested-y'>
+ </template>
+ <input id='light'>
+ </div>
+</div>
+<input id='i1'>
+
+<script>
+test(function() {
+ var xFoo = document.querySelector('#x-foo');
+ convertTemplatesToShadowRootsWithin(xFoo);
+
+ var elements = [
+ 'i0',
+ 'x-foo/inner-before',
+ 'nested/nested-x',
+ 'light',
+ 'nested/nested-y',
+ 'x-foo/inner-after',
+ 'i1'
+ ];
+
+ assert_focus_navigation_forward(elements);
+ elements.reverse();
+ assert_focus_navigation_backward(elements);
+}, 'Focus controller should treat each slot as a focus scope.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-slot-nested-2levels.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698