diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/reftests/css-ui-invalid/button | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-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/button')
20 files changed, 276 insertions, 0 deletions
diff --git a/layout/reftests/css-ui-invalid/button/button-button.html b/layout/reftests/css-ui-invalid/button/button-button.html new file mode 100644 index 000000000..b3a32a49b --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-button.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button is of the button type, 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('b').setCustomValidity('foo'); document.documentElement.className='';"> + <button class='notinvalid' id='b' type='button'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-1.html b/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-1.html new file mode 100644 index 000000000..5cf40c93a --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-1.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button 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('b'); + e.setCustomValidity('foo'); + document.documentElement.className=''; + } + </script> + <body onload="onLoadHandler();"> + <fieldset disabled> + <fieldset> + <button class='notinvalid' id='b'></button> + </fieldset> + </fieldset> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-2.html b/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-2.html new file mode 100644 index 000000000..4ee147a70 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-disabled-fieldset-2.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button 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('b'); + 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> + <button class='notinvalid' id='b'></button> + </fieldset> + </fieldset> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-disabled-ref.html b/layout/reftests/css-ui-invalid/button/button-disabled-ref.html new file mode 100644 index 000000000..7de1ba7c5 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-disabled-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <button style="background-color: green;" disabled></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-disabled.html b/layout/reftests/css-ui-invalid/button/button-disabled.html new file mode 100644 index 000000000..1607c2b64 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-disabled.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> + <!-- Test: if button 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> + <button class='notinvalid' disabled></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-dyn-disabled.html b/layout/reftests/css-ui-invalid/button/button-dyn-disabled.html new file mode 100644 index 000000000..1c7350d72 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-dyn-disabled.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button is disabled and invalid, it is barred from constraint + validation and should not be affected by :invalid pseudo-class. --> + <link rel='stylesheet' type='text/css' href='style.css'> + <script> + function onLoadHandler() + { + var e = document.getElementById('b'); + e.setCustomValidity('foo'); + e.disabled = 'true'; + document.documentElement.className=''; + } + </script> + <body onload="onLoadHandler();"> + <button class='notinvalid' id='b'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-dyn-not-disabled.html b/layout/reftests/css-ui-invalid/button/button-dyn-not-disabled.html new file mode 100644 index 000000000..7ae667b8e --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-dyn-not-disabled.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button is not disabled and invalid, it is candidate for + constraint validation and should be affected + by :invalid pseudo-class. --> + <link rel='stylesheet' type='text/css' href='style.css'> + <script> + function onLoadHandler() + { + var e = document.getElementById('b'); + e.setCustomValidity('foo'); + e.removeAttribute('disabled'); + document.documentElement.className=''; + } + </script> + <body onload="onLoadHandler();"> + <button class='invalid' id='b' disabled></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-fieldset-legend-ref.html b/layout/reftests/css-ui-invalid/button/button-fieldset-legend-ref.html new file mode 100644 index 000000000..22adc433c --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-fieldset-legend-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <body> + <fieldset> + <legend> + <button style="background-color: green;"></button> + </legend> + </fieldset> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-fieldset-legend.html b/layout/reftests/css-ui-invalid/button/button-fieldset-legend.html new file mode 100644 index 000000000..66b5ae585 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-fieldset-legend.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button 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> + <button class='invalid' id='b'></button> + </legend> + </fieldset> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-fieldset-ref.html b/layout/reftests/css-ui-invalid/button/button-fieldset-ref.html new file mode 100644 index 000000000..60ab1a3ef --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-fieldset-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <body> + <fieldset> + <fieldset disabled> + <button style="background-color: green;"></button> + </fieldset> + </fieldset> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-invalid.html b/layout/reftests/css-ui-invalid/button/button-invalid.html new file mode 100644 index 000000000..2aeaea4e1 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-invalid.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button has a custom error, it should not be affected by :valid + pseudo-class --> + <link rel='stylesheet' type='text/css' href='style.css'> + <body onload="document.getElementById('b').setCustomValidity('foo'); document.documentElement.className='';"> + <button class='invalid' id='b'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-novalidate.html b/layout/reftests/css-ui-invalid/button/button-novalidate.html new file mode 100644 index 000000000..5288415a8 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-novalidate.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html class='reftest-wait'> + <link rel='stylesheet' type='text/css' href='style.css'> + <body onload="document.getElementById('b').setCustomValidity('foo'); + document.documentElement.className = '';"> + <form novalidate> + <button id='b' class='notinvalid'></button> + </form> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-ref.html b/layout/reftests/css-ui-invalid/button/button-ref.html new file mode 100644 index 000000000..422cc9315 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <button style="background-color: green;"></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-reset.html b/layout/reftests/css-ui-invalid/button/button-reset.html new file mode 100644 index 000000000..6e64908be --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-reset.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if button is of the reset type, 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('b').setCustomValidity('foo'); document.documentElement.className='';"> + <button class='notinvalid' id='b' type='reset'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-type-barred.html b/layout/reftests/css-ui-invalid/button/button-type-barred.html new file mode 100644 index 000000000..374861542 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-type-barred.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if a button has is candidate for constraint validation then change + its type to be barred from constraint validation, it should not be + affected by :invalid pseudo-class. --> + <link rel='stylesheet' type='text/css' href='style.css'> + <script> + function onLoadHandler() + { + var b = document.getElementById('b'); + b.setCustomValidity('foo'); + b.type = 'button'; + document.documentElement.className=''; + } + </script> + <body onload="document.getElementById('b').type='button'; document.documentElement.className='';"> + <button class='notinvalid' type='submit' id='b'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-type-invalid.html b/layout/reftests/css-ui-invalid/button/button-type-invalid.html new file mode 100644 index 000000000..a6e20d1a9 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-type-invalid.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: if a button has a custom error when barred from constraint + validation then move a type candidate for constraint validation, + it should not be affected by :invalid pseudo-class. --> + <link rel='stylesheet' type='text/css' href='style.css'> + <script> + function onLoadHandler() + { + var b = document.getElementById('b'); + b.setCustomValidity('foo'); + b.type = 'submit'; + document.documentElement.className=''; + } + </script> + <body onload="onLoadHandler();"> + <button class='invalid' type='button' id='b'></button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/button-valid.html b/layout/reftests/css-ui-invalid/button/button-valid.html new file mode 100644 index 000000000..1f99c6331 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/button-valid.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> + <!-- Test: if button has no custom error and is not barred from constraint + validation, it should be affected by :invalid pseudo-class. --> + <link rel='stylesheet' type='text/css' href='style.css'> + <body> + <button class='notinvalid'</button> + </body> +</html> diff --git a/layout/reftests/css-ui-invalid/button/reftest-stylo.list b/layout/reftests/css-ui-invalid/button/reftest-stylo.list new file mode 100644 index 000000000..b4097b45d --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/reftest-stylo.list @@ -0,0 +1,14 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +== button-valid.html button-valid.html +fails fuzzy-if(skiaContent,1,3) == button-invalid.html button-invalid.html +fuzzy-if(skiaContent,2,5) == button-disabled.html button-disabled.html +fuzzy-if(skiaContent,2,5) == button-dyn-disabled.html button-dyn-disabled.html +fails fuzzy-if(skiaContent,1,3) == button-dyn-not-disabled.html button-dyn-not-disabled.html +fuzzy-if(skiaContent,1,3) == button-button.html button-button.html +fails fuzzy-if(skiaContent,1,3) == button-reset.html button-reset.html +fails fuzzy-if(skiaContent,1,3) == button-type-invalid.html button-type-invalid.html +fails fuzzy-if(skiaContent,1,3) == button-type-barred.html button-type-barred.html +fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-1.html button-disabled-fieldset-1.html +fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-2.html button-disabled-fieldset-2.html +fuzzy-if(skiaContent,1,4) == button-fieldset-legend.html button-fieldset-legend.html +fails fuzzy-if(skiaContent,1,3) == button-novalidate.html button-novalidate.html diff --git a/layout/reftests/css-ui-invalid/button/reftest.list b/layout/reftests/css-ui-invalid/button/reftest.list new file mode 100644 index 000000000..46745e3ac --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/reftest.list @@ -0,0 +1,13 @@ +== button-valid.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-invalid.html button-ref.html +fuzzy-if(skiaContent,2,5) == button-disabled.html button-disabled-ref.html +fuzzy-if(skiaContent,2,5) == button-dyn-disabled.html button-disabled-ref.html +fuzzy-if(skiaContent,1,3) == button-dyn-not-disabled.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-button.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-reset.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-type-invalid.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-type-barred.html button-ref.html +fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-1.html button-fieldset-ref.html +fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-2.html button-fieldset-ref.html +fuzzy-if(skiaContent,1,4) == button-fieldset-legend.html button-fieldset-legend-ref.html +fuzzy-if(skiaContent,1,3) == button-novalidate.html button-ref.html diff --git a/layout/reftests/css-ui-invalid/button/style.css b/layout/reftests/css-ui-invalid/button/style.css new file mode 100644 index 000000000..83653cfb1 --- /dev/null +++ b/layout/reftests/css-ui-invalid/button/style.css @@ -0,0 +1,18 @@ +/* Override default style */ +button:-moz-ui-invalid { + box-shadow: none; +} + +button.notinvalid { + background-color: green; +} +button.notinvalid:-moz-ui-invalid { + background-color: red; +} + +button.invalid { + background-color: red; +} +button.invalid:-moz-ui-invalid { + background-color: green; +} |