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

Unified Diff: LayoutTests/fast/forms/file/input-file-element-clone.html

Issue 267713006: node.cloneNode() should clone the value of file upload elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 7 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-element-clone.html
diff --git a/LayoutTests/fast/forms/file/input-file-element-clone.html b/LayoutTests/fast/forms/file/input-file-element-clone.html
new file mode 100644
index 0000000000000000000000000000000000000000..0ae8ae7acbfc175934b4a98c02d3bdb05d43faa4
--- /dev/null
+++ b/LayoutTests/fast/forms/file/input-file-element-clone.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<script src="resources/file-drag-common.js"></script>
+<form method="GET">
+<input type="file" id="file1">
+</form>
+<script>
+description('Make sure that Node.cloneNode() works as expected for file input type.');
+jsTestIsAsync = true;
+var file1 = document.getElementById('file1');
+file1.onchange = function() {
+ var clone = file1.cloneNode(true);
+ clone.id = "file2";
+ document.body.appendChild(clone);
+ var file2 = document.getElementById('file2');
+ shouldBeEqualToString("file2.value", "C:\\fakepath\\input-file-element-clone.html");
Inactive 2014/05/07 13:28:00 Would be nice if we would drag another file onto f
gnana 2014/05/07 14:22:37 Done.
+ finishJSTest();
+};
+window.onload = function()
+{
+ dragFilesOntoInput(file1, ['input-file-element-clone.html']);
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698