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

Unified Diff: LayoutTests/fast/events/tab-focus-anchor.html

Issue 15238002: Disallow tabsToLinks setting to prevent tabbing to anchor with tabIndex. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests update Created 7 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
Index: LayoutTests/fast/events/tab-focus-anchor.html
diff --git a/LayoutTests/fast/events/tab-focus-anchor.html b/LayoutTests/fast/events/tab-focus-anchor.html
index abaf7b65b4b3a5de77f2d678d55c16dac5e1964c..397f7803e74cc1633b9544fd148971897f2bf712 100644
--- a/LayoutTests/fast/events/tab-focus-anchor.html
+++ b/LayoutTests/fast/events/tab-focus-anchor.html
@@ -3,16 +3,10 @@
<head>
<script>
-function pass()
+function print(result)
dmazzoni 2013/08/01 21:48:15 I liked it better with pass() and fail().
rchl 2013/08/20 17:58:10 Done.
{
var el = document.querySelector('pre');
- el.textContent = 'PASS';
-}
-
-function fail()
-{
- var el = document.querySelector('pre');
- el.textContent = 'FAIL';
+ el.textContent += result + '\n';
}
if (window.testRunner) {
@@ -25,7 +19,7 @@ window.onload = function()
if (!window.testRunner)
return;
- for (var i = 0; i < 1; i++) {
+ for (var i = 0; i < 2; i++) {
eventSender.keyDown('\t');
}
};
@@ -37,12 +31,14 @@ window.onload = function()
<p>This test ensures that we can tab to an a element with a tab index. Press tab
to focus the element below.
-<p><a tabindex=0 onfocus="fail()" href="#">Not focusable (given the WebKitTabToLinks pref is set to false)</a>
-<p><a tabindex=0 onfocus="pass()">Focusable</a>
+<p><a onfocus="print('FAIL')" href="#">Not focusable (given the WebKitTabToLinks pref is set to false)</a>
+<p><a onfocus="print('FAIL')">Not focusable (given the WebKitTabToLinks pref is set to false)</a>
dmazzoni 2013/08/01 21:48:15 This one is not focusable no matter what the value
rchl 2013/08/20 17:58:10 Done.
+<p><a tabindex=0 onfocus="print('PASS')" href="#">Focusable</a>
+<p><a tabindex=0 onfocus="print('PASS')">Focusable</a>
<p>Result
-<pre>FAIL</pre>
+<pre id="out"></pre>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/fast/events/tab-focus-anchor-expected.txt » ('j') | Source/core/html/HTMLAnchorElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698