diff options
Diffstat (limited to 'layout/reftests/css-default/submit-button')
14 files changed, 193 insertions, 0 deletions
diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-1.html b/layout/reftests/css-default/submit-button/default-multiple-submit-1.html new file mode 100644 index 000000000..19c71e3c2 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-multiple-submit-1.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <style> + input { color: green; } + input.notdefault:default { color: red; } + input.default:not(:default) { color: red; } + </style> + <body> + <form id="one"></form> + <input type="submit" form="one" class="default" id="test"> + <form id="two"> + <input type="submit" class="notdefault"> + </form> + <script> + document.body.offsetWidth; + document.getElementById("test").setAttribute("form", "two"); + </script> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-2.html b/layout/reftests/css-default/submit-button/default-multiple-submit-2.html new file mode 100644 index 000000000..1fb2289ca --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-multiple-submit-2.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <style> + input { color: green; } + input.notdefault:default { color: red; } + input.default:not(:default) { color: red; } + </style> + <body> + <input type="submit" form="one" class="notdefault"> + <form id="one"> + <input type="submit" class="default"> + </form> + <script> + document.body.offsetWidth; + document.getElementById("one").id = "two"; + </script> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html b/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html new file mode 100644 index 000000000..3d89f8bcd --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<div> + <input type="submit" style="color: green"> +</div> +<div> + <input type="submit" style="color: green"> +</div> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-1.html b/layout/reftests/css-default/submit-button/default-submit-button-1.html new file mode 100644 index 000000000..4363ecf9c --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-1.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <!-- Test: when there is only one submit button, it is the default --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <body> + <form> + <button type='submit'>submit</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-2.html b/layout/reftests/css-default/submit-button/default-submit-button-2.html new file mode 100644 index 000000000..c25cdbb87 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-2.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- Test: when there is only one submit button and some other buttons, + there is a default --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <body> + <form> + <button type='submit'>submit</button> + <button type='reset'>text</button> + <button type='reset'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-3.html b/layout/reftests/css-default/submit-button/default-submit-button-3.html new file mode 100644 index 000000000..c9c5747a0 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-3.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- Test: when there more thon one submit button and some other buttons, + the first submit button is the default --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <body> + <form> + <button type='submit'>submit</button> + <button type='reset'>text</button> + <button type='submit'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-4.html b/layout/reftests/css-default/submit-button/default-submit-button-4.html new file mode 100644 index 000000000..9ccaf7607 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-4.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when there is a submit button which is changed, + there is no default --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <script type="text/javascript"> + function onLoadHandler() + { + document.getElementById('b1').type = "reset"; + document.documentElement.className = ''; + } + </script> + + <body onload="onLoadHandler();"> + <form> + <button type='submit' id='b1'>submit</button> + <button type='reset'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-5.html b/layout/reftests/css-default/submit-button/default-submit-button-5.html new file mode 100644 index 000000000..1b9f50659 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-5.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when there is no submit button and one is added, + there is a default submit button --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <script type="text/javascript"> + function onLoadHandler() + { + document.getElementById('b1').type = "submit"; + document.documentElement.className = ''; + } + </script> + + <body onload="onLoadHandler();"> + <form> + <button type='submit' id='b1'>submit</button> + <button type='reset'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-6.html b/layout/reftests/css-default/submit-button/default-submit-button-6.html new file mode 100644 index 000000000..b01952c43 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-6.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when there is no submit button and one is added, + there is a default submit button --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <script type="text/javascript"> + function onLoadHandler() + { + document.getElementById('b1').type = "bad-value"; + document.documentElement.className = ''; + } + </script> + + <body onload="onLoadHandler();"> + <form> + <button type='submit' id='b1'>submit</button> + <button type='reset'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-7.html b/layout/reftests/css-default/submit-button/default-submit-button-7.html new file mode 100644 index 000000000..85aa37453 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-7.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when there is no submit button and one is added, + there is a default submit button --> + <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'> + <script type="text/javascript"> + function onLoadHandler() + { + document.getElementById('b1').removeAttribute('type'); + document.documentElement.className = ''; + } + </script> + + <body onload="onLoadHandler();"> + <form> + <button type='submit' id='b1'>submit</button> + <button type='reset'>text</button> + </form> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-ref.html b/layout/reftests/css-default/submit-button/default-submit-button-ref.html new file mode 100644 index 000000000..4f890374f --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <button type="submit">submit</button> + </body> +</html> diff --git a/layout/reftests/css-default/submit-button/default-submit-button-style.css b/layout/reftests/css-default/submit-button/default-submit-button-style.css new file mode 100644 index 000000000..429d6d227 --- /dev/null +++ b/layout/reftests/css-default/submit-button/default-submit-button-style.css @@ -0,0 +1,2 @@ +button { visibility: hidden; } +button:default { visibility: visible; } diff --git a/layout/reftests/css-default/submit-button/reftest-stylo.list b/layout/reftests/css-default/submit-button/reftest-stylo.list new file mode 100644 index 000000000..d2ce67afc --- /dev/null +++ b/layout/reftests/css-default/submit-button/reftest-stylo.list @@ -0,0 +1,12 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +== default-submit-button-1.html default-submit-button-1.html +== default-submit-button-2.html default-submit-button-2.html +== default-submit-button-3.html default-submit-button-3.html +== default-submit-button-4.html default-submit-button-4.html +== default-submit-button-5.html default-submit-button-5.html +== default-submit-button-6.html default-submit-button-6.html +== default-submit-button-7.html default-submit-button-7.html + +== default-multiple-submit-1.html default-multiple-submit-1.html +== default-multiple-submit-2.html default-multiple-submit-2.html + diff --git a/layout/reftests/css-default/submit-button/reftest.list b/layout/reftests/css-default/submit-button/reftest.list new file mode 100644 index 000000000..df645e876 --- /dev/null +++ b/layout/reftests/css-default/submit-button/reftest.list @@ -0,0 +1,11 @@ +== default-submit-button-1.html default-submit-button-ref.html +== default-submit-button-2.html default-submit-button-ref.html +== default-submit-button-3.html default-submit-button-ref.html +== default-submit-button-4.html about:blank +== default-submit-button-5.html default-submit-button-ref.html +== default-submit-button-6.html default-submit-button-ref.html +== default-submit-button-7.html default-submit-button-ref.html + +== default-multiple-submit-1.html default-multiple-submit-ref.html +== default-multiple-submit-2.html default-multiple-submit-ref.html + |