Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / file / file-input-reset.html
blobc67ebbbd7a5cd692339ef298cb215fe85d8a96ce
1 <!DOCTYPE html>
2 <script src="resources/file-drag-common.js"></script>
3 <html>
4 <head>
5 </head>
6 <body>
7 <form id="form">
8 <input id="file" type="file" />
9 <input id="reset" type="reset" />
10 </form>
11 <div id="console"></div>
12 <p>
13 This tests whether the label next to the file chooser button becomes "No file chosen"
14 when we press the reset button.
15 To run this test manually, choose a file and then click the reset button.
16 If the label next to the file chooser button changes to "No file chosen", the test passes.
17 </p>
18 <script>
19 if (testRunner && eventSender) {
20 var file = document.getElementById("file");
21 var reset = document.getElementById("reset");
22 dragFilesOntoElement(file, ["foo.txt"]);
23 document.getElementById("console").innerHTML = file.value + " is selected.";
24 click(reset.offsetLeft + reset.offsetWidth / 2, reset.offsetTop + reset.offsetHeight / 2);
25 click(reset.offsetLeft + reset.offsetWidth + 10, reset.offsetTop + reset.offsetHeight + 10); // Move a cursor out of the reset button.
28 function click(x, y) {
29 eventSender.mouseMoveTo(x, y);
30 eventSender.mouseDown();
31 eventSender.mouseMoveTo(x, y);
32 eventSender.mouseUp();
34 </script>
35 </body>
36 </html>