diff --git a/layout/reftests/forms/input/file/input-file-rtl-ref.xul b/layout/reftests/forms/input/file/input-file-rtl-ref.xul
new file mode 100644
index 000000000000..862ce60d228c
--- /dev/null
+++ b/layout/reftests/forms/input/file/input-file-rtl-ref.xul
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/forms/input/file/input-file-rtl.html b/layout/reftests/forms/input/file/input-file-rtl.html
new file mode 100644
index 000000000000..986a1b352ec1
--- /dev/null
+++ b/layout/reftests/forms/input/file/input-file-rtl.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/forms/input/file/input-file-simple-ref.xul b/layout/reftests/forms/input/file/input-file-simple-ref.xul
new file mode 100644
index 000000000000..d17504dab7fb
--- /dev/null
+++ b/layout/reftests/forms/input/file/input-file-simple-ref.xul
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/forms/input/file/input-file-simple.html b/layout/reftests/forms/input/file/input-file-simple.html
new file mode 100644
index 000000000000..03a2a7bde506
--- /dev/null
+++ b/layout/reftests/forms/input/file/input-file-simple.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/forms/input/file/input-file-size.html b/layout/reftests/forms/input/file/input-file-size.html
new file mode 100644
index 000000000000..33606f935df0
--- /dev/null
+++ b/layout/reftests/forms/input/file/input-file-size.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/forms/input/file/reftest.list b/layout/reftests/forms/input/file/reftest.list
new file mode 100644
index 000000000000..c93b25db1627
--- /dev/null
+++ b/layout/reftests/forms/input/file/reftest.list
@@ -0,0 +1,3 @@
+fuzzy-if(OSX==10.6,8,128) == input-file-simple.html input-file-simple-ref.xul
+fuzzy-if(OSX==10.6,8,114) == input-file-rtl.html input-file-rtl-ref.xul
+fuzzy-if(OSX==10.6,8,128) == input-file-size.html input-file-simple-ref.xul
diff --git a/layout/reftests/forms/input/file/style.css b/layout/reftests/forms/input/file/style.css
new file mode 100644
index 000000000000..8059c5105511
--- /dev/null
+++ b/layout/reftests/forms/input/file/style.css
@@ -0,0 +1,51 @@
+vbox {
+ margin: 8px;
+}
+
+.file {
+ display: inline;
+ -moz-appearance: none;
+ padding: 0;
+ border: 2px inset ThreeDFace;
+ border-style: none;
+
+ background-color: -moz-Field;
+
+ color: -moz-FieldText;
+ font: -moz-field;
+ text-rendering: optimizeLegibility;
+ line-height: normal !important;
+ text-align: start;
+ text-transform: none;
+ word-spacing: normal;
+ letter-spacing: normal;
+ cursor: text;
+ text-indent: 0;
+ -moz-user-select: text;
+ text-shadow: none;
+}
+
+.file > label {
+ display: inline-block;
+ width: 12em;
+ -moz-padding-start: 5px;
+
+ border-color: inherit;
+ background-color: inherit;
+ color: inherit;
+ font-size: inherit;
+ letter-spacing: inherit;
+}
+
+.file > label.rtl {
+ text-align: right;
+ -moz-padding-start: 0px;
+ padding-right: 1px;
+}
+
+.file > input[type='button'] {
+ height: inherit;
+ font-size: inherit;
+ letter-spacing: inherit;
+ cursor: inherit;
+}
diff --git a/layout/reftests/forms/input/reftest.list b/layout/reftests/forms/input/reftest.list
index 86f1045104f4..1425afa71939 100644
--- a/layout/reftests/forms/input/reftest.list
+++ b/layout/reftests/forms/input/reftest.list
@@ -2,5 +2,6 @@ include email/reftest.list
include tel/reftest.list
include search/reftest.list
include url/reftest.list
+include file/reftest.list
include range/reftest.list