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

Side by Side Diff: LayoutTests/fast/images/drag-image.html

Issue 886323005: Pass InterpolationQuality into DragImage to respect image-rendering:pixelated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments. Add tests. Created 5 years, 10 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/fast/images/drag-image-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 <body>
3 <!-- Simulate dragging an image and dump the generated drag image. -->
4 <img id="image" src="resources/grid-small.png">
5 </body>
6 <script>
7 function drag() {
8 testRunner.dumpAsText();
9 testRunner.dumpDragImage();
jackhou1 2015/02/10 01:53:57 Added this hook here: https://codereview.chromium.
10
11 var image = document.getElementById('image');
12 var startX = image.offsetLeft + image.offsetWidth / 2;
13 var startY = image.offsetTop + image.offsetHeight / 2;
14 var positionX = startX + image.offsetWidth;
15 var positionY = startY + image.offsetHeight;
16
17 eventSender.dragMode = true;
18 eventSender.mouseMoveTo(startX, startY);
19 eventSender.mouseDown();
20 eventSender.mouseMoveTo(positionX, positionY);
21 eventSender.mouseUp();
22 }
23
24 if (!window.testRunner || !window.eventSender) {
25 document.write("This test does not work in manual mode.");
26 } else {
27 window.onload = drag;
28 }
29 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/images/drag-image-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698