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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../../resources/testharness.js"></script>
3 <script src="../../../../resources/testharnessreport.js"></script>
4 <div id="dragme">Make Selection Here</div>
5 <script>
6 var dragme = document.getElementById('dragme');
7 if (window.eventSender) {
yosin_UTC9 2015/07/13 03:47:22 nit: You can move |if (window.eventSender) ...| to
Miyoung Shin(g) 2015/07/13 04:23:49 Done.
8 window.getSelection().selectAllChildren(dragme);
9
10 var x = dragme.offsetLeft + dragme.offsetWidth / 2;
11 var y = dragme.offsetTop + dragme.offsetHeight / 2;
12 eventSender.gestureTapDown(x, y);
13 eventSender.gestureShowPress(x, y);
14 eventSender.gestureTap(x, y);
15 test(function() {
16 assert_equals(window.getSelection().rangeCount, 0);
17 }, "This tests if the selection is reset after tapping of gesture.");
18 }
19 if (window.testRunner)
yosin_UTC9 2015/07/13 03:47:22 nit: I think we don't need to hide HTML with w3c t
Miyoung Shin(g) 2015/07/13 04:23:49 If we remove this, we would need the expected resu
yosin_UTC9 2015/07/13 04:39:56 I don't think so. Other test files also have rende
tkent 2015/07/13 04:51:10 We need to add <div id=log></div> to hide the non-
Miyoung Shin(g) 2015/07/13 05:19:09 yosin@, tkent@, Thanks, I also found the document
20 dragme.style.display = "none";
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698