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

Unified Diff: LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html

Issue 258063005: Blink does not respect input.selectionStart and input.selectionEnd for some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added some changes in patch set 2 Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html
diff --git a/LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html b/LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html
new file mode 100644
index 0000000000000000000000000000000000000000..4983e077a14154ef85a36ba73c6057b0912d2da5
--- /dev/null
+++ b/LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function log(msg)
tkent 2014/05/07 00:54:39 Please remove this and use debug() in ../../resour
yosin_UTC9 2014/05/07 01:06:22 I recommend to use "resources/js-test.js". It prov
harpreet.sk 2014/05/07 11:57:54 Done.
harpreet.sk 2014/05/07 11:57:54 Done.
+{
+ document.getElementById('res').innerHTML = document.getElementById('res').innerHTML + msg + "<br>";
+}
+
+function testSelection()
+{
+ if (window.testRunner) {
tkent 2014/05/07 00:54:39 We prefer early return. if (window.testRunner
harpreet.sk 2014/05/07 11:57:54 Done.
+ testRunner.dumpAsText();
+ var firstInput = document.getElementById('val1');
tkent 2014/05/07 00:54:39 Wrong indentation.
harpreet.sk 2014/05/07 11:57:54 Corrected.
+ var secondInput = document.getElementById('val2');
+ firstInput.selectionStart = 3;
+ firstInput.selectionEnd = 5;
+ firstInput.value = "Parsed";
+ secondInput.selectionStart = 3;
+ secondInput.selectionEnd = 5;
+ secondInput.value = "P";
+ log('First Input - Slection start: ' + firstInput.selectionStart + ' and end: ' + firstInput.selectionEnd);
+ log('Second Input - Slection start: ' + secondInput.selectionStart + ' and end: ' + secondInput.selectionEnd);
+ }
+}
+</script>
+</head>
+<body onload="testSelection()">
+<input id="val1" type="text" />
+<input id="val2" type="text" />
+<div id="res"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698