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

Unified 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: Update test for changes in test_runner CL. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/images/drag-image-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/images/drag-image.html
diff --git a/LayoutTests/fast/images/drag-image.html b/LayoutTests/fast/images/drag-image.html
new file mode 100644
index 0000000000000000000000000000000000000000..744bbd61e725be2fb259b9e2e142fe35baf7f776
--- /dev/null
+++ b/LayoutTests/fast/images/drag-image.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<style>
+ #image {
+ width: 22px;
+ height: 22px;
+ image-rendering: pixelated;
+ }
+</style>
+<body>
+ <!-- Simulate dragging an image and dump the generated drag image. -->
+ <img id="image" src="resources/grid-small.png">
+</body>
+<script>
+ function drag() {
+ testRunner.dumpDragImage();
Justin Novosad 2015/02/11 04:30:47 Awesome!
+
+ var image = document.getElementById('image');
+ var startX = image.offsetLeft + image.offsetWidth / 2;
+ var startY = image.offsetTop + image.offsetHeight / 2;
+ var positionX = startX + image.offsetWidth;
+ var positionY = startY + image.offsetHeight;
+
+ eventSender.dragMode = true;
+ eventSender.mouseMoveTo(startX, startY);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(positionX, positionY);
+ eventSender.mouseUp();
+ }
+
+ if (!window.testRunner || !window.eventSender) {
+ document.write("This test does not work in manual mode.");
+ } else {
+ window.onload = drag;
+ }
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/images/drag-image-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698