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

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: And update expected result after removing accidentally added line Created 7 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
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..2f810dc5de38fd87b40a16a8f8e271316e0e8bdb 100644
--- a/LayoutTests/fast/events/tab-focus-anchor.html
+++ b/LayoutTests/fast/events/tab-focus-anchor.html
@@ -6,13 +6,13 @@
function pass()
{
var el = document.querySelector('pre');
- el.textContent = 'PASS';
+ el.textContent += 'PASS\n';
}
function fail()
{
var el = document.querySelector('pre');
- el.textContent = 'FAIL';
+ el.textContent += 'FAIL\n';
}
if (window.testRunner) {
@@ -25,7 +25,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 +37,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 onfocus="fail()" href="#">Not focusable (given the WebKitTabToLinks pref is set to false)</a>
+<p><a onfocus="fail()">Not focusable</a>
+<p><a tabindex=0 onfocus="pass()" href="#">Focusable</a>
<p><a tabindex=0 onfocus="pass()">Focusable</a>
<p>Result
-<pre>FAIL</pre>
+<pre id="out"></pre>
</body>
</html>
« no previous file with comments | « LayoutTests/fast/events/frame-tab-focus-expected.txt ('k') | LayoutTests/fast/events/tab-focus-anchor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698