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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html

Issue 2362223002: Stop clamping tabIndex to short range (Closed)
Patch Set: Fix tabindex-clamp.html Created 4 years, 1 month 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: third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html b/third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html
index 8561f52cc94378b1947da0d19072dd04e48bd25c..9ded97c2b0e75b8ecaa42a34bf0a0ed6c7d05bc4 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html
@@ -1,5 +1,8 @@
<html>
<head>
+ <style>
+ input { display: none; }
+ </style>
<script>
function log(msg) {
document.getElementById('log').appendChild(document.createTextNode(msg + '\n'));
@@ -21,7 +24,7 @@
logTabIndex(inputs[i]);
}
- var indices = [40000, 32768, 32767, 32766, 0, -1, -32767, -32768, -40000];
+ var indices = [3147483648, 2147483648, 2147483647, 2147483646, 0, -1, -2147483647, -2147483648, -3147483648, "", "foo"];
log('Testing setAttribute on an anchor element made with document.createElement');
@@ -42,20 +45,20 @@
</script>
</head>
<body onload="test()">
- <p>This page tests that the <tt>tabindex</tt> attribute is clamped to
- values between -32768 and 32767. Values outside of this range should be
- clamped to the range limits.</p>
-
- <input tabindex="40000">
- <input tabindex="32768">
- <input tabindex="32767">
- <input tabindex="32766">
+ <p>This page tests that the <tt>tabindex</tt> attribute is accepted for
+ values between -2147483648 and 2147483647. Values outside of this range will
+ make the tabIndex reflected value zero.</p>
+
+ <input tabindex="3147483648">
+ <input tabindex="2147483648">
+ <input tabindex="2147483647">
+ <input tabindex="2147483646">
<input tabindex="0">
<input tabindex="-1">
- <input tabindex="-32767">
- <input tabindex="-32768">
- <input tabindex="-32769">
- <input tabindex="-40000">
+ <input tabindex="-2147483647">
+ <input tabindex="-2147483648">
+ <input tabindex="-2147483649">
+ <input tabindex="-3147483648">
<pre id="log"></pre>
</body>

Powered by Google App Engine
This is Rietveld 408576698