4 <form method=
"GET" action=
"get-file-upload.html" enctype=
"application/x-www-form-urlencoded">
5 <input type=
"file" name=
"file" id=
"file">
6 <input type=
"file" name=
"nofile">
7 <input type=
"hidden" name=
"submitted" value=
"true">
9 <pre id='console'
></pre>
14 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
17 function startOrVerify()
19 var query
= window
.location
.search
;
20 if (query
.indexOf('submitted=true') != -1) {
22 if (query
.indexOf('file=get-file-upload.html&') == -1)
23 log('FAIL: No file=get-file-upload.html; ' + query
);
24 else if (query
.indexOf('nofile=&') == -1)
25 log('FAIL: No nofile=; ' + query
);
27 log('PASS: ' + query
);
28 testRunner
.notifyDone();
31 eventSender
.beginDragWithFiles(['get-file-upload.html']);
32 eventSender
.mouseMoveTo(10, 10);
33 eventSender
.mouseUp();
34 document
.forms
[0].submit();
38 if (window
.eventSender
) {
39 testRunner
.dumpAsText();
40 testRunner
.waitUntilDone();
41 window
.onload
= startOrVerify
;