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

Unified Diff: LayoutTests/fast/events/drag-in-flex.html

Issue 1057953002: Make flexibleBox visible position cadidate only where it is editable. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use helvetica if possible. Created 5 years, 9 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
Index: LayoutTests/fast/events/drag-in-flex.html
diff --git a/LayoutTests/fast/events/drag-in-flex.html b/LayoutTests/fast/events/drag-in-flex.html
new file mode 100644
index 0000000000000000000000000000000000000000..dbed3717ac272f29efde2b1acaa4359b559618cf
--- /dev/null
+++ b/LayoutTests/fast/events/drag-in-flex.html
@@ -0,0 +1,36 @@
+<style>
+div {
+ display: flex;
+ font-family: 'Helvetica Neue', sans-serif;
+ zoom: 150%;
+}
+
+</style>
+<div>
+ <span>Drag from behind of button to this text.</span>
+ <button></button>
+</div>
+<script>
+function applyZoom(rect, zoom)
+{
+ var newRect = {
+ left : rect.left * zoom,
+ top : rect.top * zoom,
+ width : rect.width * zoom,
+ height : rect.height * zoom
+ };
+ return newRect;
+};
+
+var zoom = getComputedStyle(document.querySelector('div')).getPropertyValue('zoom');
+var buttonRect = applyZoom(document.querySelector('button').getBoundingClientRect(), zoom);
+var spanRect = applyZoom(document.querySelector('span').getBoundingClientRect(), zoom);
+
+if (window.testRunner) {
+ eventSender.mouseMoveTo(buttonRect.left + buttonRect.width * 2, buttonRect.top + buttonRect.height / 2);
+ eventSender.mouseDown();
+ eventSender.leapForward(100);
+ eventSender.mouseMoveTo(spanRect.left + spanRect.width / 2, spanRect.top + spanRect.height / 2);
+ eventSender.mouseUp();
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698