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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html

Issue 1810293002: Set sequential focus navigation starting point on scrollIntoView() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use testRunner.findString() for testing findText. Created 4 years, 9 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 | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html b/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
index e65c502a0e2a5de7824fb959cabdc43645243037..6aa77d22593415237effa61ef1fc724096ad2d98 100644
--- a/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
+++ b/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
@@ -69,5 +69,28 @@ test(function() {
eventSender.keyDown('\t', ['shiftKey']);
assert_equals(document.activeElement.id, 'prev');
}, 'After removing a focused element from the documen tree, sequential focus navigation should start at a place where the focused element was.');
+
+test(function() {
+ var container = document.querySelector('#container');
+ container.innerHTML = '<input id="i1"><input id="i2"><input id="i3">';
+ container.querySelector('#i3').click();
+ container.querySelector('#i1').scrollIntoView();
+ eventSender.keyDown('\t');
+ assert_equals(document.activeElement.id, 'i2');
+}, 'Element.scrollIntoView() should update sequential focus navigation starting point.');
+
+test(function() {
+ var container = document.querySelector('#container');
+ container.innerHTML = '<span>Lorem</span><span tabindex="0" id="ipsum">ipsum</span><span>dolor</span><span tabindex="0" id="sit">sit</span><span>amet</span>';
+ testRunner.findString("dolor", []);
+ eventSender.keyDown('\t');
+ assert_equals(document.activeElement.id, 'sit');
+ testRunner.findString("Lorem", []);
+ eventSender.keyDown('\t');
+ assert_equals(document.activeElement.id, 'ipsum');
+ testRunner.findString("amet", []);
+ eventSender.keyDown('\t', ['shiftKey']);
+ assert_equals(document.activeElement.id, 'sit');
+}, 'Find text should update sequential focus navigation starting point.');
</script>
</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698