summaryrefslogtreecommitdiffstats
path: root/WebCore/manual-tests/clear-input-file.html
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commit9364f22aed35e1a1e9d07c121510f80be3ab0502 (patch)
treed49911209b132da58d838efa852daf28d516df21 /WebCore/manual-tests/clear-input-file.html
parent87eb0cb35bad8784770ebc807e6c982432e47107 (diff)
downloadexternal_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.zip
external_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.tar.gz
external_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.tar.bz2
Initial Contribution
Diffstat (limited to 'WebCore/manual-tests/clear-input-file.html')
-rw-r--r--WebCore/manual-tests/clear-input-file.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/WebCore/manual-tests/clear-input-file.html b/WebCore/manual-tests/clear-input-file.html
new file mode 100644
index 0000000..f1ef360
--- /dev/null
+++ b/WebCore/manual-tests/clear-input-file.html
@@ -0,0 +1,27 @@
+<script>
+function clearWithReset()
+{
+ document.getElementById("form").reset();
+}
+function clearBySettingValue()
+{
+ document.getElementById("file").value = "";
+}
+function clearBySettingValueToNull()
+{
+ document.getElementById("file").value = null;
+}
+function clearBySettingValueToX()
+{
+ document.getElementById("file").value = "x";
+}
+</script>
+<p>Use this to test the various ways you can clear an input type=file element.</p>
+<form id="form">
+<p>Choose a file here: <input type="file" id="file"></input></p>
+<p>Then press one of these buttons, that should clear the file:
+<input type="button" value="clear with reset()" onclick="clearWithReset()">
+<input type="button" value="clear by setting value to ''" onclick="clearBySettingValue()"></p>
+<p>Or press this button that should clear the file, but won't, due to <a href="http://bugs.webkit.org/show_bug.cgi?id=13448">bug 13448</a>: <input type="button" value="clear by setting value to null" onclick="clearBySettingValueToNull()"></p>
+<p>Or press this button to verify we can't set to a non-empty value: <input type="button" value="clear by setting value to 'x'" onclick="clearBySettingValueToX()"></p>
+</form>