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

Unified Diff: third_party/WebKit/LayoutTests/editing/input/scroll-with-tab-to-input-regression.html

Issue 2894803002: Use current selection when tab navigation. (Closed)
Patch Set: Fix selection direction Created 3 years, 7 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/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/input/scroll-with-tab-to-input-regression.html
diff --git a/third_party/WebKit/LayoutTests/editing/input/scroll-with-tab-to-input-regression.html b/third_party/WebKit/LayoutTests/editing/input/scroll-with-tab-to-input-regression.html
new file mode 100644
index 0000000000000000000000000000000000000000..97bbc20cd7bad7ab68ff3db5a8babdd6c482c94e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/input/scroll-with-tab-to-input-regression.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div style="margin-top:120%"><input id="checkbox" type="checkbox" /></div>
+<input id="input" value="foo">
+<script>
+promise_test(() =>{return new Promise((resolve) => {
+ if (window.eventSender === undefined)
+ return reject('required window.eventSender');
+ checkbox.focus();
+ setTimeout(resolve, 0);
+}).then(() => {
+ var scrollY = window.scrollY;
+ assert_greater_than(window.scrollY, 0);
+ assert_equals(document.activeElement, checkbox);
+ eventSender.keyDown('Tab');
+ assert_equals(document.activeElement, input);
+ eventSender.keyDown('Tab', ['shiftKey']);
+ assert_equals(document.activeElement, checkbox);
+ eventSender.keyDown('Tab');
+ return new Promise((resolve) => {
+ setTimeout(resolve(scrollY), 0);
+ });
+}).then((scrollY) => {
+ assert_equals(window.scrollY, scrollY, 'Screen should not scroll');
+});});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698