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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/selection-functions.html

Issue 1437813002: Set selection to INPUT/TEXTAREA before dispatching 'focus' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/selection-functions-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/selection-functions.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html b/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html
index e256af5e84b268fbe17fb4e2ac44d27f78542e1c..3b6bc3899ddfec8a4941c60f5e151a27cfe9a32d 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html
@@ -88,6 +88,17 @@
elt.selectionEnd = 7;
display(elt);
+ print("");
+ print("selectionStart and selectionEnd in focus handler:");
+ // Need to clear selection. Selection API calls above modified
+ // both of real selection and |elt|'s cached selection even
+ // though |elt| has no focus.
+ // We'd like to check the behavior in case that real selection
+ // and the cached selection are mismatched.
+ getSelection().removeAllRanges();
yoichio 2015/11/17 05:56:40 Could you have |elt.selectionStart = elt.selection
tkent 2015/11/17 06:02:45 Setting 0 to them makes unable to check the behavi
tkent 2015/11/17 06:24:54 I added it to new patch set.
+ elt.onfocus = function() { display(elt); };
+ elt.focus();
+
elt.value = "";
}
function testButtonSelectionAccess(button, access)
@@ -121,4 +132,4 @@
<hr />
<p id="console"></p>
</body>
-</html>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/selection-functions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698