Index: LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html |
diff --git a/LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html b/LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4b95fa67c1030aedf1593a65edb2204d7e68ca82 |
--- /dev/null |
+++ b/LayoutTests/fast/events/tab-focus-anchor-tab-to-links.html |
@@ -0,0 +1,51 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+ |
+function pass() |
dmazzoni
2013/09/10 21:35:47
One last thing - since this is a new test it'd be
|
+{ |
+ var el = document.querySelector('pre'); |
+ el.textContent += 'PASS\n'; |
+} |
+ |
+function fail() |
+{ |
+ var el = document.querySelector('pre'); |
+ el.textContent += 'FAIL\n'; |
+} |
+ |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true); |
+} |
+ |
+window.onload = function() |
+{ |
+ if (!window.testRunner) |
+ return; |
+ |
+ for (var i = 0; i < 3; i++) { |
+ eventSender.keyDown('\t'); |
+ } |
+}; |
+ |
+</script> |
+</head> |
+<body> |
+ |
+<p>This test ensures that we can tab to all anchor elements. Press tab three |
+times to focus the elements below. |
+ |
+<p><a onfocus="pass()" href="#">Focusable</a></p> |
+<p><a onfocus="fail()">Not focusable</a></p> |
+<p><a tabindex=0 onfocus="pass()" href="#">Focusable</a></p> |
+<p><a tabindex=0 onfocus="pass()">Focusable</a></p> |
+<p><input onfocus="fail()"></p> |
+ |
+<p>Result |
+ |
+<pre id="out"></pre> |
+ |
+</body> |
+</html> |