зеркало из https://github.com/mozilla/gecko-dev.git
Bug 658282 (1/2) - Improve css-invalid/input/ test suite. r=bz
This commit is contained in:
Родитель
f01c81013a
Коммит
79bade5b8b
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input type='button' style="background-color: green;">
|
||||
<input type='button' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input value='foo@bar.com' style="background-color: green;">
|
||||
<input value='foo@bar.com' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input style="background-color: green;">
|
||||
<input class='ref'>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<fieldset>
|
||||
<fieldset>
|
||||
<input style="background-color: green;">
|
||||
<input class='ref'>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input type='image' style="background-color: green;">
|
||||
<input type='image' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input type='radio' class='ref' checked>
|
||||
<input type='radio' class='ref'>
|
||||
</body>
|
||||
</html>
|
|
@ -4,14 +4,8 @@
|
|||
radio should not be invalid. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('i1').setCustomValidity('foo');
|
||||
if (!document.getElementById('i1').mozMatchesSelector(':invalid') ||
|
||||
document.getElementById('i2').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i1' name='foo' type='radio'>
|
||||
<input id='i2' name='foo' type='radio'>
|
||||
<input class='invalid' id='i1' name='foo' type='radio'>
|
||||
<input class='notinvalid' id='i2' name='foo' type='radio'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,14 +4,8 @@
|
|||
group, all radio should not suffer from being missing. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('i1').checked = true;
|
||||
if (document.getElementById('i1').mozMatchesSelector(':invalid') ||
|
||||
document.getElementById('i2').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i1' name='foo' type='radio' required>
|
||||
<input id='i2' name='foo' type='radio'>
|
||||
<input class='notinvalid' id='i1' name='foo' type='radio' required>
|
||||
<input class='notinvalid' id='i2' name='foo' type='radio'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,14 +4,8 @@
|
|||
group, all radio should not suffer from being missing. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('i1').required = false;
|
||||
if (document.getElementById('i1').mozMatchesSelector(':invalid') ||
|
||||
document.getElementById('i2').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i1' name='foo' type='radio' required>
|
||||
<input id='i2' name='foo' type='radio'>
|
||||
<input class='notinvalid' id='i1' name='foo' type='radio' required>
|
||||
<input class='notinvalid' id='i2' name='foo' type='radio'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="if (document.getElementById('i').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i' type='radio' checked required>
|
||||
<body>
|
||||
<input class='notinvalid' id='i' type='radio' checked required>
|
||||
<input class='notinvalid' type='radio'> <!-- adding this one so we don't have to create a second ref -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="if (!document.getElementById('i').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i' type='radio' required>
|
||||
<body>
|
||||
<input class='invalid' id='i' type='radio' required>
|
||||
<input class='notinvalid' type='radio'> <!-- adding this one so we don't have to create a second ref -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input type='radio' class='ref'>
|
||||
<input type='radio' class='ref'>
|
||||
</body>
|
||||
</html>
|
|
@ -1,16 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<html>
|
||||
<!-- Test: if one radio in a group has the required attribute and no radio is
|
||||
checked, all radio in the group should suffer from being missing. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="if (!document.getElementById('i1').mozMatchesSelector(':invalid') ||
|
||||
!document.getElementById('i2').mozMatchesSelector(':invalid')) {
|
||||
document.body.textContent='FAIL';
|
||||
} else {
|
||||
document.body.textContent='SUCCESS';
|
||||
}
|
||||
document.documentElement.className='';">
|
||||
<input id='i1' name='foo' type='radio' required>
|
||||
<input id='i2' name='foo' type='radio'>
|
||||
<body>
|
||||
<input class='invalid' id='i1' name='foo' type='radio' required>
|
||||
<input class='invalid' id='i2' name='foo' type='radio'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input style="background-color: green;">
|
||||
<input class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input type='submit' style="background-color: green;">
|
||||
<input type='submit' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input value='http://mozilla.org/' style="background-color: green;">
|
||||
<input value='http://mozilla.org/' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<input value='foo' style="background-color: green;">
|
||||
<input value='foo' class='ref'>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -23,12 +23,12 @@ fails-if(Android) == input-dyn-disabled.html input-ref.html
|
|||
== input-disabled-fieldset-1.html input-fieldset-ref.html
|
||||
== input-disabled-fieldset-2.html input-fieldset-ref.html
|
||||
== input-fieldset-legend.html input-fieldset-legend-ref.html
|
||||
== input-radio-required.html success-ref.html
|
||||
== input-radio-customerror.html success-ref.html
|
||||
== input-radio-dyn-valid-1.html success-ref.html
|
||||
== input-radio-dyn-valid-2.html success-ref.html
|
||||
== input-radio-nogroup-required-valid.html success-ref.html
|
||||
== input-radio-nogroup-required-invalid.html success-ref.html
|
||||
== input-radio-required.html input-radio-ref.html
|
||||
== input-radio-customerror.html input-radio-ref.html
|
||||
== input-radio-dyn-valid-1.html input-radio-checked-ref.html
|
||||
== input-radio-dyn-valid-2.html input-radio-ref.html
|
||||
== input-radio-nogroup-required-valid.html input-radio-ref.html
|
||||
== input-radio-nogroup-required-invalid.html input-radio-checked-ref.html
|
||||
== input-submit.html input-submit-ref.html
|
||||
== input-image.html input-image-ref.html
|
||||
# input type='hidden' shouldn't show
|
||||
|
|
|
@ -1,18 +1,26 @@
|
|||
/* Override default style */
|
||||
input {
|
||||
-moz-appearance: none;
|
||||
background: none;
|
||||
}
|
||||
input:invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
input.notinvalid {
|
||||
background-color: green;
|
||||
box-shadow: 0 0 1.5px 1px green;
|
||||
}
|
||||
input.notinvalid:invalid {
|
||||
background-color: red;
|
||||
box-shadow: 0 0 1.5px 1px red;
|
||||
}
|
||||
|
||||
input.invalid {
|
||||
background-color: red;
|
||||
box-shadow: 0 0 1.5px 1px red;
|
||||
}
|
||||
input.invalid:invalid {
|
||||
background-color: green;
|
||||
box-shadow: 0 0 1.5px 1px green;
|
||||
}
|
||||
|
||||
input.ref {
|
||||
box-shadow: 0 0 1.5px 1px green;
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
SUCCESS
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче