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

Side by Side Diff: LayoutTests/editing/selection/drag-drop-restore.html

Issue 21030005: Editor: Deffer event dispatch after selection change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/selection/drag-drop-restore-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body onload="runTest()">
7 <input type="text" id="src">
8 <input type="text" id="dst">
9 <script>
10 description("This test verifies that content of input box could be restored in ' focus' event fired by drag-and-drop.");
11
12 var oldValue = "foo";
13
14 function runTest()
15 {
16 var src = document.getElementById('src');
17 src.value = "abc";
18 var dst = document.getElementById('dst');
19
20 function restoreValue()
21 {
22 oldValue = src.value;
23 src.value = "abc";
24 }
25 dst.addEventListener("focus", restoreValue, false);
yosin_UTC9 2013/08/26 01:58:55 Please check order of events and action, e.g. sele
26
27 src.select();
28 eventSender.mouseMoveTo(src.offsetLeft + src.offsetWidth / 2, src.offsetTop + src.offsetHeight / 2);
29 eventSender.mouseDown();
30 eventSender.leapForward(100);
31 eventSender.mouseMoveTo(dst.offsetLeft + dst.offsetWidth / 2, dst.offsetTop + dst.offsetHeight / 2);
32 eventSender.mouseUp();
33
34 shouldBeEqualToString("oldValue", "");
35 shouldBeEqualToString("src.value", "abc");
36 shouldBeEqualToString("dst.value", "abc");
37 }
38 </script>
39 <script src="../../fast/js/resources/js-test-post.js"></script>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/drag-drop-restore-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698