1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/84400-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,179 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 1.5 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 1.6 + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 1.7 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.8 + <head> 1.9 + <title>Testing controls that should match :enabled/:disabled</title> 1.10 + <style type="text/css"> 1.11 + input, textarea, button, *.hideme { display: none; } 1.12 + div { margin-bottom: 0.2em; } 1.13 + 1.14 + span, option, optgroup { background-color: red; } 1.15 + *:enabled + span.true, option.true:enabled, optgroup.true:enabled { color: lime; background-color: lime; } 1.16 + *:disabled + span.false, option.false:disabled, optgroup.false:disabled { color: lime; background-color: lime; } 1.17 + </style> 1.18 + <script type="text/javascript"> 1.19 + // Runs through i1, i2, .... in and toggles the |disabled| attribute 1.20 + function onLoad() { 1.21 + var i = 1; 1.22 + var el = document.getElementById("i1"); 1.23 + while (el) { 1.24 + if (el.hasAttribute("disabled")) { 1.25 + el.removeAttribute("disabled"); 1.26 + } else { 1.27 + el.setAttribute("disabled", "disabled"); 1.28 + } 1.29 + ++i; 1.30 + el = document.getElementById("i" + i); 1.31 + } 1.32 + if (i != 31) { 1.33 + alert("onLoad() handler failed!"); 1.34 + } 1.35 + } 1.36 + 1.37 + window.addEventListener("load", onLoad, false); 1.38 + </script> 1.39 + </head> 1.40 + <body> 1.41 + <div> 1.42 + There should be no red in the following (note: form styling should be enabled). 1.43 + </div> 1.44 + 1.45 + <form method="get" action="."> 1.46 + <div> 1.47 + input: 1.48 + <input/> <span class="true">FAIL</span> 1.49 + <input disabled="disabled"/> <span class="false">FAIL</span> 1.50 + <input id="i1"/> <span class="false">FAIL</span> 1.51 + <input id="i2" disabled="disabled"/> <span class="true">FAIL</span> 1.52 + </div> 1.53 + 1.54 + <div> 1.55 + password: 1.56 + <input type="password"/> <span class="true">FAIL</span> 1.57 + <input type="password" disabled="disabled"/> <span class="false">FAIL</span> 1.58 + <input type="password" id="i3"/> <span class="false">FAIL</span> 1.59 + <input type="password" id="i4" disabled="disabled"/> <span class="true">FAIL</span> 1.60 + </div> 1.61 + 1.62 + <div> 1.63 + checkbox: 1.64 + <input type="checkbox"/> <span class="true">FAIL</span> 1.65 + <input type="checkbox" disabled="disabled"/> <span class="false">FAIL</span> 1.66 + <input type="checkbox" id="i5"/> <span class="false">FAIL</span> 1.67 + <input type="checkbox" id="i6" disabled="disabled"/> <span class="true">FAIL</span> 1.68 + </div> 1.69 + 1.70 + <div> 1.71 + radio: 1.72 + <input type="radio"/> <span class="true">FAIL</span> 1.73 + <input type="radio" disabled="disabled"/> <span class="false">FAIL</span> 1.74 + <input type="radio" id="i7"/> <span class="false">FAIL</span> 1.75 + <input type="radio" id="i8" disabled="disabled"/> <span class="true">FAIL</span> 1.76 + </div> 1.77 + 1.78 + <div> 1.79 + submit: 1.80 + <input type="submit"/> <span class="true">FAIL</span> 1.81 + <input type="submit" disabled="disabled"/> <span class="false">FAIL</span> 1.82 + <input type="submit" id="i9"/> <span class="false">FAIL</span> 1.83 + <input type="submit" id="i10" disabled="disabled"/> <span class="true">FAIL</span> 1.84 + </div> 1.85 + 1.86 + <div> 1.87 + reset: 1.88 + <input type="reset"/> <span class="true">FAIL</span> 1.89 + <input type="reset" disabled="disabled"/> <span class="false">FAIL</span> 1.90 + <input type="reset" id="i11"/> <span class="false">FAIL</span> 1.91 + <input type="reset" id="i12" disabled="disabled"/> <span class="true">FAIL</span> 1.92 + </div> 1.93 + 1.94 + <div> 1.95 + file: 1.96 + <input type="file"/> <span class="true">FAIL</span> 1.97 + <input type="file" disabled="disabled"/> <span class="false">FAIL</span> 1.98 + <input type="file" id="i13"/> <span class="false">FAIL</span> 1.99 + <input type="file" id="i14" disabled="disabled"/> <span class="true">FAIL</span> 1.100 + </div> 1.101 + 1.102 + <div> 1.103 + hidden: 1.104 + <input type="hidden"/> <span class="true">FAIL</span> 1.105 + <input type="hidden" disabled="disabled"/> <span class="false">FAIL</span> 1.106 + <input type="hidden" id="i15"/> <span class="false">FAIL</span> 1.107 + <input type="hidden" id="i16" disabled="disabled"/> <span class="true">FAIL</span> 1.108 + </div> 1.109 + 1.110 + <div> 1.111 + image: 1.112 + <input type="image"/> <span class="true">FAIL</span> 1.113 + <input type="image" disabled="disabled"/> <span class="false">FAIL</span> 1.114 + <input type="image" id="i17"/> <span class="false">FAIL</span> 1.115 + <input type="image" id="i18" disabled="disabled"/> <span class="true">FAIL</span> 1.116 + </div> 1.117 + 1.118 + <div> 1.119 + button (input): 1.120 + <input type="button"/> <span class="true">FAIL</span> 1.121 + <input type="button" disabled="disabled"/> <span class="false">FAIL</span> 1.122 + <input type="button" id="i19"/> <span class="false">FAIL</span> 1.123 + <input type="button" id="i20" disabled="disabled"/> <span class="true">FAIL</span> 1.124 + </div> 1.125 + 1.126 + <div> 1.127 + textarea: 1.128 + <textarea cols="5" rows="5"></textarea> <span class="true">FAIL</span> 1.129 + <textarea cols="5" rows="5" disabled="disabled"></textarea> <span class="false">FAIL</span> 1.130 + <textarea cols="5" rows="5" id="i21"></textarea> <span class="false">FAIL</span> 1.131 + <textarea cols="5" rows="5" id="i22" disabled="disabled"></textarea> <span class="true">FAIL</span> 1.132 + </div> 1.133 + 1.134 + <div> 1.135 + button: 1.136 + <button>bogus</button> <span class="true">FAIL</span> 1.137 + <button disabled="disabled">bogus</button> <span class="false">FAIL</span> 1.138 + <button id="i23">bogus</button> <span class="false">FAIL</span> 1.139 + <button id="i24" disabled="disabled">bogus</button> <span class="true">FAIL</span> 1.140 + </div> 1.141 + 1.142 + <div> 1.143 + select: 1.144 + <select class="hideme"><option>bogus</option></select> <span class="true">FAIL</span> 1.145 + <select class="hideme" disabled="disabled"><option>bogus</option></select> <span class="false">FAIL</span> 1.146 + <select class="hideme" id="i25"><option>bogus</option></select> <span class="false">FAIL</span> 1.147 + <select class="hideme" id="i26" disabled="disabled"><option>bogus</option></select> <span class="true">FAIL</span> 1.148 + 1.149 + </div> 1.150 + 1.151 + <div> 1.152 + option: 1.153 + <select size="4"> 1.154 + <option class="true">FAIL</option> 1.155 + <option class="false" disabled="disabled">FAIL</option> 1.156 + <option class="false" id="i27">FAIL</option> 1.157 + <option class="true" id="i28" disabled="disabled">FAIL</option> 1.158 + </select> 1.159 + </div> 1.160 + 1.161 + <div> 1.162 + optgroup: 1.163 + <select size="4"> 1.164 + <optgroup class="true" label="FAIL"> 1.165 + <option class="hideme">bogus</option> 1.166 + </optgroup> 1.167 + <optgroup class="false" disabled="disabled" label="FAIL"> 1.168 + <option class="hideme">bogus</option> 1.169 + </optgroup> 1.170 + <optgroup class="false" id="i29" label="FAIL"> 1.171 + <option class="hideme">bogus</option> 1.172 + </optgroup> 1.173 + <optgroup class="true" disabled="disabled" id="i30" label="FAIL"> 1.174 + <option class="hideme">bogus</option> 1.175 + </optgroup> 1.176 + </select> 1.177 + </div> 1.178 + 1.179 + </form> 1.180 + 1.181 + </body> 1.182 +</html>