summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html b/third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html
new file mode 100644
index 0000000..24de2b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/file/input-file-re-render.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form>
+ <input type="file" name="file" multiple id="file">
+</form>
+<p>The file upload control above should have text '2 files,' not a filename.</p>
+
+<script>
+function startTest()
+{
+ var input = document.getElementById('file');
+
+ // Drop 2 files to the control.
+ eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/TEMPLATE.html']);
+ eventSender.mouseMoveTo(10, 10);
+ eventSender.mouseUp();
+
+ // Delete the renderer.
+ input.style.display = 'none';
+ input.offsetWidth; // Force to do layout
+
+ // Attach a renderer again.
+ input.style.display = 'inline-block';
+
+ layoutTestController.notifyDone();
+}
+
+if (window.eventSender) {
+ window.onload = startTest;
+ layoutTestController.waitUntilDone();
+}
+</script>
+</body>
+</html>