OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 if (window.testRunner) | 5 if (window.testRunner) |
6 testRunner.dumpAsText(true); // Dump pixel test result. | 6 testRunner.dumpAsTextWithPixelResults(); // Dump pixel test result. |
7 </script> | 7 </script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <!-- The output of this test is only meaningful as a pixel test result because f
orm controls have a platform-specific look-and-feel. --> | 10 <!-- The output of this test is only meaningful as a pixel test result because f
orm controls have a platform-specific look-and-feel. --> |
11 <!-- You can run this test either in DRT as a pixel test or by hand. --> | 11 <!-- You can run this test either in DRT as a pixel test or by hand. --> |
12 <div id="description"> | 12 <div id="description"> |
13 <p>This tests that pressing on the file input button visually changes its appear
ance. For instance, when pressed, the button will have an Aqua background color
when using the Blue appearance (System Preferences > General) on OS X.</p> | 13 <p>This tests that pressing on the file input button visually changes its appear
ance. For instance, when pressed, the button will have an Aqua background color
when using the Blue appearance (System Preferences > General) on OS X.</p> |
14 <p>To run this test manually, click and hold on the input file button (below). T
his test PASSED if the button visually highlights when pressed. Otherwise, it FA
ILED.</p> | 14 <p>To run this test manually, click and hold on the input file button (below). T
his test PASSED if the button visually highlights when pressed. Otherwise, it FA
ILED.</p> |
15 </div> | 15 </div> |
16 <input type="file" id="file"> | 16 <input type="file" id="file"> |
17 <script> | 17 <script> |
18 if (window.eventSender) { | 18 if (window.eventSender) { |
19 // Remove the descriptive text so as minimize pixel differences due to discr
epancies in font rendering. | 19 // Remove the descriptive text so as minimize pixel differences due to discr
epancies in font rendering. |
20 document.body.removeChild(document.getElementById("description")); | 20 document.body.removeChild(document.getElementById("description")); |
21 | 21 |
22 var file = document.getElementById("file"); | 22 var file = document.getElementById("file"); |
23 var x = file.offsetLeft + 10; | 23 var x = file.offsetLeft + 10; |
24 var y = file.offsetTop + 10; | 24 var y = file.offsetTop + 10; |
25 eventSender.mouseMoveTo(x, y); | 25 eventSender.mouseMoveTo(x, y); |
26 eventSender.mouseDown(); | 26 eventSender.mouseDown(); |
27 } | 27 } |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |