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..d9e76e49d88472a1fa4ab69903a8a68e2eec87fe |
--- /dev/null |
+++ b/LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html |
@@ -0,0 +1,32 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<input id="val1" type="text" /> |
+<input id="val2" type="text" /> |
+<script type="text/javascript"> |
+description('Test for BUG=367736: Blink does not respect input.selectionStart and input.selectionEnd for some cases.'); |
+var firstInput = document.getElementById('val1'); |
+var secondInput = document.getElementById('val2'); |
+if (!window.testRunner) { |
tkent
2014/05/20 09:51:40
This test doesn't need testRunner.
|
+ debug('This test needs window.testRunner to work.'); |
+} else { |
+ firstInput.selectionStart = 3; |
+ firstInput.selectionEnd = 5; |
+ firstInput.value = "Parsed"; |
tkent
2014/05/20 09:51:40
nit: double-quotes though other quotes are single.
|
+ shouldBe('firstInput.selectionStart', '6'); |
harpreet.sk
2014/05/19 11:16:52
I checked this case on the browser and it was show
tkent
2014/05/20 09:51:40
I don't know. Please investigate by yourself.
harpreet.sk
2014/05/23 10:46:24
I found that whenver we give test file as an input
|
+ shouldBe('firstInput.selectionEnd', '6'); |
+ secondInput.selectionStart = 3; |
+ secondInput.selectionEnd = 5; |
+ secondInput.value = "P"; |
tkent
2014/05/20 09:51:40
nit: double-quotes
|
+ shouldBe('secondInput.selectionStart', '1'); |
+ shouldBe('secondInput.selectionEnd', '1'); |
+ secondInput.value = "Parsed"; |
tkent
2014/05/20 09:51:40
nit: double-quotes
|
+ shouldBe('secondInput.selectionStart', '6'); |
harpreet.sk
2014/05/19 11:16:52
Ditto. I think test runner always returns selectio
|
+ shouldBe('secondInput.selectionEnd', '6'); |
+} |
+</script> |
+</body> |
+</html> |