summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html b/third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html
new file mode 100644
index 0000000..83e59cb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/file/get-file-upload.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form method="GET" action="get-file-upload.html" enctype="application/x-www-form-urlencoded">
+ <input type="file" name="file" id="file">
+ <input type="hidden" name="submitted" value="true">
+</form>
+<pre id='console'></pre>
+
+<script>
+function log(message)
+{
+ document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
+}
+
+function startOrVerify()
+{
+ var query = window.location.search;
+ if (query.indexOf('submitted=true') != -1) {
+ // Verify the result
+ if (query.indexOf('file=') != -1)
+ log('PASS: ' + query);
+ else
+ log('FAIL: ' + query);
+ layoutTestController.dumpAsText();
+ layoutTestController.notifyDone();
+ } else {
+ // Start the test
+ eventSender.beginDragWithFiles(['get-file-upload.html']);
+ eventSender.mouseMoveTo(10, 10);
+ eventSender.mouseUp();
+ document.forms[0].submit();
+ }
+}
+
+if (window.eventSender) {
+ layoutTestController.waitUntilDone();
+ window.onload = startOrVerify;
+}
+</script>
+</body>
+</html>