summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-ui-invalid/select
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/css-ui-invalid/select
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/css-ui-invalid/select')
-rw-r--r--layout/reftests/css-ui-invalid/select/reftest-stylo.list22
-rw-r--r--layout/reftests/css-ui-invalid/select/reftest.list18
-rw-r--r--layout/reftests/css-ui-invalid/select/select-disabled-fieldset-1.html22
-rw-r--r--layout/reftests/css-ui-invalid/select/select-disabled-fieldset-2.html25
-rw-r--r--layout/reftests/css-ui-invalid/select/select-disabled-ref.html6
-rw-r--r--layout/reftests/css-ui-invalid/select/select-disabled.html9
-rw-r--r--layout/reftests/css-ui-invalid/select/select-dyn-disabled.html18
-rw-r--r--layout/reftests/css-ui-invalid/select/select-dyn-not-disabled.html19
-rw-r--r--layout/reftests/css-ui-invalid/select/select-fieldset-legend-ref.html10
-rw-r--r--layout/reftests/css-ui-invalid/select/select-fieldset-legend.html22
-rw-r--r--layout/reftests/css-ui-invalid/select/select-fieldset-ref.html10
-rw-r--r--layout/reftests/css-ui-invalid/select/select-invalid-reset.html15
-rw-r--r--layout/reftests/css-ui-invalid/select/select-invalid.html10
-rw-r--r--layout/reftests/css-ui-invalid/select/select-novalidate.html11
-rw-r--r--layout/reftests/css-ui-invalid/select/select-ref.html6
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-invalid-1.html12
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-invalid-2.html12
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-invalid-changed-1.html13
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-invalid-changed-2.html13
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-multiple-invalid-changed.html15
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-multiple-invalid.html13
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-multiple-ref.html10
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-multiple-valid.html12
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-ref.html9
-rw-r--r--layout/reftests/css-ui-invalid/select/select-required-valid.html11
-rw-r--r--layout/reftests/css-ui-invalid/select/select-valid.html9
-rw-r--r--layout/reftests/css-ui-invalid/select/style.css18
27 files changed, 370 insertions, 0 deletions
diff --git a/layout/reftests/css-ui-invalid/select/reftest-stylo.list b/layout/reftests/css-ui-invalid/select/reftest-stylo.list
new file mode 100644
index 000000000..666fa6ad5
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/reftest-stylo.list
@@ -0,0 +1,22 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+needs-focus == select-valid.html select-valid.html
+fails fuzzy-if(skiaContent,1,3) needs-focus == select-invalid.html select-invalid.html
+fails fuzzy-if(skiaContent,2,5) needs-focus == select-invalid-reset.html select-invalid-reset.html
+needs-focus == select-disabled.html select-disabled.html
+skip-if(B2G||Mulet) needs-focus == select-dyn-disabled.html select-dyn-disabled.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails fuzzy-if(skiaContent,1,3) needs-focus == select-dyn-not-disabled.html select-dyn-not-disabled.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-1.html select-required-invalid-1.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-2.html select-required-invalid-2.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-1.html select-required-invalid-changed-1.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-2.html select-required-invalid-changed-2.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid.html select-required-valid.html
+needs-focus == select-required-multiple-invalid.html select-required-multiple-invalid.html
+fails fuzzy-if(asyncPan&&!layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-invalid-changed.html
+needs-focus == select-required-multiple-valid.html select-required-multiple-valid.html
+skip-if(B2G||Mulet) fails-if(Android) fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-1.html select-disabled-fieldset-1.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) fails-if(Android) fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-2.html select-disabled-fieldset-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend.html
+fails fuzzy-if(skiaContent,1,5) needs-focus == select-novalidate.html select-novalidate.html
diff --git a/layout/reftests/css-ui-invalid/select/reftest.list b/layout/reftests/css-ui-invalid/select/reftest.list
new file mode 100644
index 000000000..1fd197793
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/reftest.list
@@ -0,0 +1,18 @@
+needs-focus == select-valid.html select-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus == select-invalid.html select-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-invalid-reset.html select-required-ref.html
+needs-focus == select-disabled.html select-disabled-ref.html
+needs-focus == select-dyn-disabled.html select-disabled-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus == select-dyn-not-disabled.html select-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-1.html select-required-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-2.html select-required-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-1.html select-required-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-2.html select-required-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid.html select-required-ref.html
+needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-ref.html
+needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html
+fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html
+fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html
+fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html
+fuzzy-if(skiaContent,1,5) needs-focus == select-novalidate.html select-required-ref.html
diff --git a/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-1.html b/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-1.html
new file mode 100644
index 000000000..a1c830371
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select has a disabled fieldset ancestor, it is barred from
+ constraint validation and should not be affected by :-moz-ui-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onLoadHandler()
+ {
+ var e = document.getElementById('s');
+ e.setCustomValidity('foo');
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onLoadHandler();">
+ <fieldset disabled>
+ <fieldset>
+ <select class='notinvalid' id='s'></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-2.html b/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-2.html
new file mode 100644
index 000000000..e466e0305
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-disabled-fieldset-2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select has a disabled fieldset ancestor, it is barred from
+ constraint validation and should not be affected by :-moz-ui-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var e = document.getElementById('s');
+ e.setCustomValidity('foo');
+ var fieldsets = document.getElementsByTagName("fieldset");
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled>
+ <fieldset>
+ <select class='notinvalid' id='s'></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-disabled-ref.html b/layout/reftests/css-ui-invalid/select/select-disabled-ref.html
new file mode 100644
index 000000000..e3a228a89
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-disabled-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select disabled style="background-color: green;"></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-disabled.html b/layout/reftests/css-ui-invalid/select/select-disabled.html
new file mode 100644
index 000000000..a38d8bca3
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-disabled.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select is disabled, it is barred from constraint validation
+ and should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').setCustomValidity('foo'); document.documentElement.className='';">
+ <select class='notinvalid' id='s' disabled></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-dyn-disabled.html b/layout/reftests/css-ui-invalid/select/select-dyn-disabled.html
new file mode 100644
index 000000000..5fed3005d
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-dyn-disabled.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select is disabled and invalid, it is barred from constraint
+ validation and should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onLoadHandler()
+ {
+ var e = document.getElementById('s');
+ e.setCustomValidity('foo');
+ e.disabled = 'true';
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onLoadHandler();">
+ <select class='notinvalid' id='s'></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-dyn-not-disabled.html b/layout/reftests/css-ui-invalid/select/select-dyn-not-disabled.html
new file mode 100644
index 000000000..bab99531b
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-dyn-not-disabled.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select is not disabled and invalid, it is candidate for
+ constraint validation and should be affected
+ by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onLoadHandler()
+ {
+ var e = document.getElementById('s');
+ e.setCustomValidity('foo');
+ e.removeAttribute('disabled');
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onLoadHandler();">
+ <select class='invalid' id='s' disabled></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-fieldset-legend-ref.html b/layout/reftests/css-ui-invalid/select/select-fieldset-legend-ref.html
new file mode 100644
index 000000000..5083cea90
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-fieldset-legend-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset>
+ <legend>
+ <select style="background-color: green;"></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-fieldset-legend.html b/layout/reftests/css-ui-invalid/select/select-fieldset-legend.html
new file mode 100644
index 000000000..3e76408ec
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-fieldset-legend.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select has a disabled fieldset ancestor, but is in the first
+ legend, it is not barred from constraint validation and should be
+ affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onLoadHandler()
+ {
+ var e = document.getElementById('b');
+ e.setCustomValidity('foo');
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onLoadHandler();">
+ <fieldset disabled>
+ <legend>
+ <select class='invalid' id='b'></select>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-fieldset-ref.html b/layout/reftests/css-ui-invalid/select/select-fieldset-ref.html
new file mode 100644
index 000000000..ca82a8022
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-fieldset-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <fieldset>
+ <fieldset>
+ <select disabled style="background-color: green;"></select>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-invalid-reset.html b/layout/reftests/css-ui-invalid/select/select-invalid-reset.html
new file mode 100644
index 000000000..8b8e7c6fd
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-invalid-reset.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select has a custom error, it should be affected by :-moz-ui-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').selectedIndex = 0;
+ document.forms[0].reset();
+ document.documentElement.className='';">
+ <form>
+ <select id='s' class='notinvalid' id='s' required>
+ <option value="">foo</option>
+ </select>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-invalid.html b/layout/reftests/css-ui-invalid/select/select-invalid.html
new file mode 100644
index 000000000..df3526dfc
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-invalid.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if select has a custom error, it should be affected by :-moz-ui-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').setCustomValidity('foo');
+ document.documentElement.className='';">
+ <select class='invalid' id='s'></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-novalidate.html b/layout/reftests/css-ui-invalid/select/select-novalidate.html
new file mode 100644
index 000000000..cccd39b80
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-novalidate.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <form novalidate>
+ <select required id='s' class='notinvalid'>
+ <option selected value="">foo</option>
+ </select>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-ref.html b/layout/reftests/css-ui-invalid/select/select-ref.html
new file mode 100644
index 000000000..a28668557
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select style="background-color: green;"></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-invalid-1.html b/layout/reftests/css-ui-invalid/select/select-required-invalid-1.html
new file mode 100644
index 000000000..064695c52
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-invalid-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select is required and the selected option has an empty
+ string value and the selection didn't changed,
+ :-moz-ui-invalid should not apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid' required>
+ <option selected value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-invalid-2.html b/layout/reftests/css-ui-invalid/select/select-required-invalid-2.html
new file mode 100644
index 000000000..7a32805c9
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-invalid-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select is required and the selected option has an empty
+ string value and the selection didn't changed,
+ :-moz-ui-invalid should not apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid' required>
+ <option value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-1.html b/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-1.html
new file mode 100644
index 000000000..e8f3142fc
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <!-- Test: if select is required and the selected option has an empty
+ string value and the selection did changed,
+ :-moz-ui-invalid should apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').selectedIndex = 0;
+ document.documentElement.className = '';">
+ <select id='s' class='invalid' required>
+ <option selected value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-2.html b/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-2.html
new file mode 100644
index 000000000..c57e38206
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-invalid-changed-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <!-- Test: if select is required and the selected option has an empty
+ string value and the selection did changed,
+ :-moz-ui-invalid should apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').selectedIndex = 0;
+ document.documentElement.className = '';">
+ <select id='s' class='invalid' required>
+ <option value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid-changed.html b/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid-changed.html
new file mode 100644
index 000000000..547acaea6
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid-changed.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <!-- Test: if select is required, has all selected option value set to the
+ empty string, and the selection did changed,
+ :-moz-ui-invalid should apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('s').options[0].selected = true;
+ document.getElementById('s').options[1].selected = true;
+ document.documentElement.className = '';">
+ <select id='s' class='notinvalid' required multiple>
+ <option selected></option>
+ <option selected value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid.html b/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid.html
new file mode 100644
index 000000000..d59ee7ee6
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-multiple-invalid.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select is required, has all selected option value set to the
+ empty string, and the selection did not changed,
+ :-moz-ui-invalid should not apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid' required multiple>
+ <option selected></option>
+ <option selected value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-multiple-ref.html b/layout/reftests/css-ui-invalid/select/select-required-multiple-ref.html
new file mode 100644
index 000000000..a9477333f
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-multiple-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select multiple style="background-color: green;">
+ <option selected></option>
+ <option selected value="">foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-multiple-valid.html b/layout/reftests/css-ui-invalid/select/select-required-multiple-valid.html
new file mode 100644
index 000000000..8ae8b89b0
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-multiple-valid.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select is required and has a selected option which has value
+ different from the empty string, :-moz-ui-invalid should not apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid' required multiple>
+ <option selected></option>
+ <option selected>foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-ref.html b/layout/reftests/css-ui-invalid/select/select-required-ref.html
new file mode 100644
index 000000000..3c2bde80a
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select style="background-color: green;">
+ <option selected value="">foo</option>
+ </selecT>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-required-valid.html b/layout/reftests/css-ui-invalid/select/select-required-valid.html
new file mode 100644
index 000000000..9fb309b19
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-required-valid.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select is required and has a select option which has value
+ different from the empty string, :-moz-ui-invalid should not apply. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid' required>
+ <option selected>foo</option>
+ </select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/select-valid.html b/layout/reftests/css-ui-invalid/select/select-valid.html
new file mode 100644
index 000000000..268157b6e
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/select-valid.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if select has no custom error and is not barred from constraint
+ validation, it should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <select class='notinvalid'></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/select/style.css b/layout/reftests/css-ui-invalid/select/style.css
new file mode 100644
index 000000000..e8561a2bd
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/select/style.css
@@ -0,0 +1,18 @@
+/* Override default style */
+select:-moz-ui-invalid {
+ box-shadow: none;
+}
+
+select.notinvalid {
+ background-color: green;
+}
+select.notinvalid:-moz-ui-invalid {
+ background-color: red;
+}
+
+select.invalid {
+ background-color: red;
+}
+select.invalid:-moz-ui-invalid {
+ background-color: green;
+}