blob: 3330f816e12c2e0d99be9923ced6b62a84426f35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<!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();
// Move the mouse away before moving on. This is done because landing the patch for bug 249328
// would cause this test to fail. That patch fixes a hover problem which causes this test
// to actually perform correctly (after switching back to display: inline-block, the style of
// the file control would be 'hovered', since it's under the mouse). However, the 'expected'
// PNG files were created when this was not working properly, and the control is in its un-hovered state.
eventSender.mouseMoveTo(300, 300);
// Delete the renderer.
input.style.display = 'none';
input.offsetWidth; // Force to do layout
// Attach a renderer again.
input.style.display = 'inline-block';
testRunner.notifyDone();
}
if (window.eventSender) {
window.onload = startTest;
testRunner.waitUntilDone();
}
</script>
</body>
</html>
|