diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/popovers/popover-focus-harness.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/popovers/popover-focus-harness.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-focus-harness.html b/testing/web-platform/tests/html/semantics/popovers/popover-focus-harness.html new file mode 100644 index 0000000000..a22a68ea2b --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popovers/popover-focus-harness.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>Popover utils - harness test</title> +<link rel="author" href="mailto:masonf@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/popover-utils.js"></script> + +<button id=button1 tabindex="0">Button1</button> +<button id=button2 tabindex="0">Button2</button> +<button id=button3 tabindex="0">Button3</button> + +<script> +promise_test(async t => { + button1.focus(); + assert_equals(document.activeElement,button1); + await sendTab(); + assert_equals(document.activeElement,button2,'Tab should move to button 2'); + await sendShiftTab(); + assert_equals(document.activeElement,button1,'Shift-Tab should move back to button 1'); +}, "Test sendShiftTab"); +</script> |