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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/slot-assigned-slot.html

Issue 1878543002: Add a regression test for focus behavior with slots that are assigned to a slot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test description Created 4 years, 8 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/slot-assigned-slot.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/slot-with-tabindex.html b/third_party/WebKit/LayoutTests/shadow-dom/slot-assigned-slot.html
similarity index 76%
copy from third_party/WebKit/LayoutTests/shadow-dom/slot-with-tabindex.html
copy to third_party/WebKit/LayoutTests/shadow-dom/slot-assigned-slot.html
index 483a54c60cbf9deef67294d05b0e515f072ca6db..66971e89f519cbc112ac3b49490adfe5f26f182f 100644
--- a/third_party/WebKit/LayoutTests/shadow-dom/slot-with-tabindex.html
+++ b/third_party/WebKit/LayoutTests/shadow-dom/slot-assigned-slot.html
@@ -7,11 +7,12 @@
<p>
document tree: [i0 -> [x-foo]]<br>
x-foo's shadow tree: [j1 -> [s1] -> [s2] -> j2 ->[x-bar]]<br>
- x-bar's shadow tree: [[s3] -> k1]<br>
+ x-bar's shadow tree: [k1 -> [s3]]<br>
slot #s1: [i1 -> i2]<br>
slot #s2: [i3]<br>
- slot #s3: [l1 -> l2]<br><br>
- <b>v1 ideal nav forward: [i0 -> j1 -> i1 -> i2 -> i3 -> j2 -> x-bar -> l1 -> l2 -> k1]</b><br>
+ slot #s3: [[s4]]<br>
+ slot #s4: [i4 -> i5]<br><br>
+ <b>v1 ideal nav forward: [i0 -> j1 -> i1 -> i2 -> i3 -> j2 -> x-bar -> k1 -> i4 -> i5]</b><br>
</p>
<input id="i0" tabindex=0 value="i0">
@@ -19,13 +20,14 @@
<input id="i2" slot="s1" tabindex=2 value="i2">
<input id="i1" slot="s1" tabindex=1 value="i1">
<input id="i3" slot="s2" tabindex=3 value="i3">
+ <input id="i4" slot="s4" tabindex=4 value="i4">
+ <input id="i5" slot="s4" tabindex=5 value="i5">
<template data-mode="open">
<div id="x-bar" tabindex=5>
- <input id="l2" slot="s3" tabindex=2 value="l2">
- <input id="l1" slot="s3" tabindex=1 value="l1">
+ <slot id="s4" name="s4" slot="s3"></slot>
<template data-mode="open">
- <slot id="s3" name="s3" tabindex=1></slot>
- <input id="k1" tabindex=2 value="k1">
+ <slot id="s3" name="s3" tabindex=2></slot>
+ <input id="k1" tabindex=1 value="k1">
</template>
</div>
<input id="j1" tabindex=1 value="j1">
@@ -49,9 +51,9 @@ test(function() {
'i3',
'x-foo/j2',
'x-foo/x-bar',
- 'x-foo/l1',
- 'x-foo/l2',
'x-foo/x-bar/k1',
+ 'i4',
+ 'i5'
];
for (var i = 0; i + 1 < elements.length; ++i)
@@ -59,6 +61,6 @@ test(function() {
elements.reverse();
for (var i = 0; i + 1 < elements.length; ++i)
assert_true(shouldNavigateFocus(elements[i], elements[i + 1], 'backward'), elements[i] + ' to ' + elements[i + 1]);
-}, 'Slots tabindex should be considred in focus navigation.');
+}, 'Focus should cover assigned elements of an assigned slot, as well as elements that are directly assigned to a slot.');
</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698