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

Unified Diff: LayoutTests/fast/forms/file/input-file-write-files.html

Issue 148983008: Reduce test code duplication in fast/forms/file (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: LayoutTests/fast/forms/file/input-file-write-files.html
diff --git a/LayoutTests/fast/forms/file/input-file-write-files.html b/LayoutTests/fast/forms/file/input-file-write-files.html
index 43ebca376ef05f2462960968982898a3cb019e20..1613b24b956dd676f1a4699a387b2fe4e6c8f9c5 100644
--- a/LayoutTests/fast/forms/file/input-file-write-files.html
+++ b/LayoutTests/fast/forms/file/input-file-write-files.html
@@ -2,6 +2,7 @@
<html>
<head>
<script src="../../../resources/js-test.js"></script>
+<script src="resources/file-drag-common.js"></script>
</head>
<body>
<input type="file" name="file1" id="file1">
@@ -30,18 +31,6 @@ if (window.testRunner) {
shouldBe("file1.files.length", "1");
shouldBeEqualToString("file1.files.item(0).name", "bar.txt");
}
-
-function moveMouseToCenterOfElement(element) {
- var centerX = element.offsetLeft + element.offsetWidth / 2;
- var centerY = element.offsetTop + element.offsetHeight / 2;
- eventSender.mouseMoveTo(centerX, centerY);
-}
-
-function dragFilesOntoInput(input, files) {
- eventSender.beginDragWithFiles(files);
- moveMouseToCenterOfElement(input);
- eventSender.mouseUp();
-}
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698