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

Side by Side Diff: LayoutTests/editing/pasteboard/paste-when-over-link.html

Issue 23060022: Don't turn middleclicks into click events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed tests that no longer added any value. Created 7 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/editing/pasteboard/paste-when-over-link-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 <body>
4 <p id="description">
5 This test passes if middle mouse clicking on a link where the event handler
6 focuses a textarea does not paste into the textarea.
7 </p>
8 <a href="link" id="link">Link</a>
9 <textarea id="textarea">Content</textarea>
10 <script src="../../resources/dump-as-markup.js"></script>
11 <script>
12
13 Markup.description(document.getElementById('description').textContent);
14
15 document.body.focus();
16 document.execCommand('SelectAll', false, null);
17 document.execCommand('Copy', false, null);
18
19 var textarea = document.getElementById('textarea');
20 var linkElement = document.getElementById('link');
21
22 linkElement.addEventListener("click", function(e) {
23 e.preventDefault();
24 textarea.focus();
25 });
26
27 var linkX = linkElement.offsetLeft + linkElement.offsetWidth / 2;
28 var linkY = linkElement.offsetTop + linkElement.offsetHeight / 2;
29
30 eventSender.mouseMoveTo(linkX, linkY);
31 eventSender.mouseDown(1);
32 eventSender.mouseUp(1);
33
34 Markup.dump(textarea, 'After middle click on link');
35 </script>
36 </body>
37 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/pasteboard/paste-when-over-link-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698