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

Unified Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html

Issue 1049233003: Keep the selection of the text field when changed by JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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/events/touch/gesture/gesture-tap-reset-selection-range.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html
diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..2dd4a1ec1eb3518eb7bd024f10b3a2c7fe201290
--- /dev/null
+++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../../../resources/testharness.js"></script>
+<script src="../../../../resources/testharnessreport.js"></script>
+<input id="input1" type="input">
+<input id="input2" type="input">
+<script>
+test(function(t)
+{
+ var sucessInput = false;
+ if (!window.eventSender)
+ return;
+ var input = document.getElementById('input1');
+ input.focus();
+
+ textInputController.setMarkedText('abcde', 1, 3);
+ assert_true(textInputController.hasMarkedText());
+ assert_equals(textInputController.markedRange().toString(), "0,5");
+
+ var input2 = document.getElementById('input2');
+ input2.addEventListener('input', function () {
+ sucessInput = true;
+ });
+ var x = input2.offsetLeft + input2.offsetWidth / 2;
+ var y = input2.offsetTop + input2.offsetHeight / 2;
+ eventSender.gestureTapDown(x, y);
+ eventSender.gestureShowPress(x, y);
+ eventSender.gestureTap(x, y);
+
+ eventSender.keyDown('a');
+ assert_true(sucessInput);
+}, "This tests if the composition is reset before tapping of gesture.");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698