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

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

Issue 2377543002: Sequential focus navigation across frames should clear per-document starting point. (Closed)
Patch Set: Created 4 years, 3 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/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/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 6aa77d22593415237effa61ef1fc724096ad2d98..818bdd1558eb1c82dbeb4c833510afbda0b89599 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
@@ -92,5 +92,21 @@ test(function() {
eventSender.keyDown('\t', ['shiftKey']);
assert_equals(document.activeElement.id, 'sit');
}, 'Find text should update sequential focus navigation starting point.');
+
+var t = async_test('Cross-frame sequential focus navigation should clear per-document starting point.');
+t.step(() => {
+ var container = document.querySelector('#container');
+ container.innerHTML = '<iframe tabindex=0 srcdoc="<input id=inner1><input id=inner2>"></iframe><input id=outer1>';
+ var iframe = container.firstChild;
+ document.querySelector('#outer1').addEventListener('focus', () => { iframe.focus() }, false);
+ iframe.addEventListener('load', t.step_func(() => {
+ var inner2 = iframe.contentDocument.querySelector('#inner2');
+ inner2.focus();
+ eventSender.keyDown('\t');
+ eventSender.keyDown('\t', ['shiftKey']);
+ assert_equals(iframe.contentDocument.activeElement, inner2);
+ t.done();
+ }), false);
+});
</script>
</body>
« 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