Commit 3458b911 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Add a basic rendering test for <input type=file>

file-input-disabled.html is merged into the new test.

Bug: 1040828
Change-Id: I3eeca8ff9f44011f0efb023ee15f1a13463967ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011463Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733521}
parent 7bb59d6b
<!DOCTYPE html>
<style>
input {
margin: 4px;
}
</style>
<body>
<div>Normal: <input type=file>
Disabled: <input type=file disabled></div>
<div>
Various sizes:
<input type=file style="width:1em">
<input type=file style="width:2em">
<input type=file style="width:3em">
<input type=file style="width:4em">
<input type=file style="width:5em">
<input type=file style="width:6em">
<input type=file style="width:7em">
<input type=file style="width:8em">
<input type=file style="width:9em">
<input type=file style="width:10em">
<input type=file style="width:11em">
<input type=file style="width:12em">
<input type=file style="width:13em">
<input type=file style="width:14em">
<input type=file style="width:22em">
</div>
<div>
<input type=file style="height:8px">
<input type=file style="height:30px; border:1px solid lightgray;">
</div>
<div>
<input type=file style="font-size:20px">
<input type=file style="text-decoration:underline">
</div>
<div>
<style>
.button-display-none::-webkit-file-upload-button {
display: none;
}
.button-appearance-none::-webkit-file-upload-button {
-webkit-appearance: none;
}
.button-shadow::-webkit-file-upload-button {
box-shadow: 8px 8px 8px gray;
}
</style>
Styling ::-webkit-file-upload-button:
<input type=file class="button-display-none">
<input type=file class="button-appearance-none">
<input type=file class="button-shadow">
<div>
</body>
<html>
<head>
<title>Testing disabling file input</title>
<script language="JavaScript" type="text/javascript">
<!--
function checkboxClicked(element) {
if (element.checked) {
document.getElementById("file_input").disabled = false;
} else {
document.getElementById("file_input").disabled = true;
}
}
//-->
</script>
</head>
<body>
<form>
<table>
<input name="attach_screenshot" type="checkbox" onClick="checkboxClicked(this);">
<b>Attach File</b><br><br>
&nbsp;&nbsp;Select File:&nbsp;
<input id="file_input" name="thumbnail_file" type="file" disabled="true"><br>
</form>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment