summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-08-30 03:36:28 +0000
committertkent@chromium.org <tkent@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-08-30 03:36:28 +0000
commit32688d45753f9c67d22ab762468108f82432ec2c (patch)
tree00b497d01bee031ab1268535b3a2354ec6f35ad2 /third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html
parent53f7b56c4d6590193ef83fad8bc015e37295983f (diff)
downloadchromium_src-32688d45753f9c67d22ab762468108f82432ec2c.zip
chromium_src-32688d45753f9c67d22ab762468108f82432ec2c.tar.gz
chromium_src-32688d45753f9c67d22ab762468108f82432ec2c.tar.bz2
REGRESSION: Dropping on file input doesn't work if files are dopped on button text.
This is a regression by r152700 or r153212. DragController assumed a shadow button in input[type=file] didn't have any child nodes. * asFileInput: Support a case that the specified node is a Text node in a button. Simplify the implementation. * elementUnderMouse: Support a case that innerNode is a Text node child of a ShadowRoot parent. BUG=280617 TEST=automated Review URL: https://chromiumcodereview.appspot.com/23538005 git-svn-id: svn://svn.chromium.org/blink/trunk@156952 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html b/third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html
index 89a80d9..fab3c8a 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/file/file-input-change-event.html
@@ -33,6 +33,11 @@ if (window.testRunner) {
shouldBeEqualToString("singleFileInput.value", "C:\\fakepath\\foo.txt");
shouldBe("changeDispatched", "true");
+ dragFilesOntoButtonInsideFileInput(singleFileInput, ["baz.png"]);
+ shouldBeEqualToString("singleFileInput.value", "C:\\fakepath\\baz.png");
+ shouldBe("changeDispatched", "true");
+
+ debug("");
debug("Test that the 'change' event is triggered on a multiple file form when a selected file is changed:");
dragFilesOntoInput(multipleFilesInput, ["foo.txt"]);
shouldBeEqualToString("multipleFilesInput.value", "C:\\fakepath\\foo.txt");
@@ -100,6 +105,13 @@ function dragFilesOntoInput(input, files) {
moveMouseToCenterOfElement(input);
eventSender.mouseUp();
}
+
+function dragFilesOntoButtonInsideFileInput(input, files) {
+ changeDispatched = false;
+ eventSender.beginDragWithFiles(files);
+ eventSender.mouseMoveTo(input.offsetLeft + 10, input.offsetTop + input.offsetHeight / 2);
+ eventSender.mouseUp();
+}
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>