mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 606491 (2/2) - Update tests. r=smaug a=jst
This commit is contained in:
parent
a5271eb914
commit
f76255784b
@ -1,4 +1,4 @@
|
||||
function check(aElementName, aBarred, aType) {
|
||||
function check(aElementName, aBarred) {
|
||||
let doc = gBrowser.contentDocument;
|
||||
let tooltip = document.getElementById("aHTMLTooltip");
|
||||
let content = doc.getElementById('content');
|
||||
@ -6,10 +6,6 @@ function check(aElementName, aBarred, aType) {
|
||||
let e = doc.createElement(aElementName);
|
||||
content.appendChild(e);
|
||||
|
||||
if (aType) {
|
||||
e.type = aType;
|
||||
}
|
||||
|
||||
ok(!FillInHTMLTooltip(e),
|
||||
"No tooltip should be shown when the element is valid");
|
||||
|
||||
@ -19,7 +15,7 @@ function check(aElementName, aBarred, aType) {
|
||||
"No tooltip should be shown when the element is barred from constraint validation");
|
||||
} else {
|
||||
ok(FillInHTMLTooltip(e),
|
||||
"A tooltip should be shown when the element isn't valid");
|
||||
e.tagName + " " +"A tooltip should be shown when the element isn't valid");
|
||||
}
|
||||
|
||||
e.setAttribute('title', '');
|
||||
@ -62,19 +58,18 @@ function test () {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
let testData = [
|
||||
/* element name, barred, type */
|
||||
[ 'input', false, null],
|
||||
[ 'textarea', false, null],
|
||||
[ 'button', true, 'button'],
|
||||
[ 'button', false, 'submit' ],
|
||||
[ 'select', false, null],
|
||||
[ 'output', true, null],
|
||||
[ 'fieldset', true, null],
|
||||
[ 'object', 'false' ],
|
||||
/* element name, barred */
|
||||
[ 'input', false ],
|
||||
[ 'textarea', false ],
|
||||
[ 'button', true ],
|
||||
[ 'select', false ],
|
||||
[ 'output', true ],
|
||||
[ 'fieldset', true ],
|
||||
[ 'object', true ],
|
||||
];
|
||||
|
||||
for each (let data in testData) {
|
||||
check(data[0], data[1], data[2]);
|
||||
check(data[0], data[1]);
|
||||
}
|
||||
|
||||
let todo_testData = [
|
||||
|
@ -292,8 +292,8 @@ checkPatternAttribute(input);
|
||||
// |validTypes| are the types which accept @pattern
|
||||
// and |invalidTypes| are the ones which do not accept it.
|
||||
var validTypes = Array('text', 'password', 'search', 'telephone', 'email', 'url');
|
||||
var barredTypes = Array('hidden', 'reset', 'button');
|
||||
var invalidTypes = Array('checkbox', 'radio', 'file', 'submit', 'image');
|
||||
var barredTypes = Array('hidden', 'reset', 'button', 'submit', 'image');
|
||||
var invalidTypes = Array('checkbox', 'radio', 'file');
|
||||
// TODO: 'datetime', 'date', 'month', 'week', 'time', 'datetime-local',
|
||||
// 'number', 'range', ande 'color' do not accept the @pattern too but are
|
||||
// not implemented yet.
|
||||
|
@ -118,8 +118,8 @@ function checkDefaultPseudoClass()
|
||||
":valid pseudo-class should apply");
|
||||
|
||||
is(window.getComputedStyle(document.getElementById('b'), null)
|
||||
.getPropertyValue('background-color'), "rgb(0, 255, 0)",
|
||||
":valid pseudo-class should apply");
|
||||
.getPropertyValue('background-color'), "rgb(0, 0, 0)",
|
||||
":valid pseudo-class should not apply");
|
||||
}
|
||||
|
||||
function checkSpecificWillValidate()
|
||||
@ -143,6 +143,14 @@ function checkSpecificWillValidate()
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
i.type = "button";
|
||||
ok(!i.willValidate, "Button state input should be barred from constraint validation");
|
||||
is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
i.type = "image";
|
||||
ok(!i.willValidate, "Image state input should be barred from constraint validation");
|
||||
is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
i.type = "submit";
|
||||
ok(!i.willValidate, "Submit state input should be barred from constraint validation");
|
||||
is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
i.type = "";
|
||||
@ -165,10 +173,14 @@ function checkSpecificWillValidate()
|
||||
ok(!b.willValidate, "Button state button should be barred from constraint validation");
|
||||
is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
b.type = "";
|
||||
ok(b.willValidate, "Default button element should not be barred from constraint validation");
|
||||
b.type = "submit";
|
||||
ok(!b.willValidate, "Submit state button should be barred from constraint validation");
|
||||
is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 255, 0)", ":valid pseudo-class should apply");
|
||||
"rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
|
||||
b.type = "";
|
||||
ok(!b.willValidate, "Default button element should be barred from constraint validation");
|
||||
is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
|
||||
"rgb(0, 0, 0)", ":valid pseudo-class should apply");
|
||||
|
||||
// textarea element
|
||||
t = document.getElementById('t');
|
||||
@ -296,27 +308,25 @@ checkDefaultPseudoClass();
|
||||
|
||||
checkSpecificWillValidate();
|
||||
|
||||
// Not checking fieldset, object and keygen
|
||||
// Not checking button, fieldset, object and keygen
|
||||
// because they are always barred from constraint validation.
|
||||
checkCommonWillValidate(document.getElementById('i'));
|
||||
checkCommonWillValidate(document.getElementById('b'));
|
||||
checkCommonWillValidate(document.getElementById('s'));
|
||||
checkCommonWillValidate(document.getElementById('t'));
|
||||
checkCommonWillValidate(document.getElementById('o'));
|
||||
|
||||
/* TODO: add "keygen" element */
|
||||
checkCustomError(document.getElementById('i'), false);
|
||||
checkCustomError(document.getElementById('b'), false);
|
||||
checkCustomError(document.getElementById('s'), false);
|
||||
checkCustomError(document.getElementById('t'), false);
|
||||
checkCustomError(document.getElementById('o'), false);
|
||||
checkCustomError(document.getElementById('b'), true);
|
||||
checkCustomError(document.getElementById('f'), true);
|
||||
checkCustomError(document.getElementById('obj'), true);
|
||||
|
||||
// Not checking fieldset, object and keygen
|
||||
// Not checking button, fieldset, object and keygen
|
||||
// because they are always barred from constraint validation.
|
||||
checkCheckValidity(document.getElementById('i'));
|
||||
checkCheckValidity(document.getElementById('b'));
|
||||
checkCheckValidity(document.getElementById('s'));
|
||||
checkCheckValidity(document.getElementById('t'));
|
||||
checkCheckValidity(document.getElementById('o'));
|
||||
|
@ -333,14 +333,14 @@ checkRequiredAttribute(document.createElement('input'));
|
||||
// The require attribute behavior depend of the input type.
|
||||
// First of all, checks for types that make the element barred from
|
||||
// constraint validation.
|
||||
var typeBarredFromConstraintValidation = ["hidden", "button", "reset"];
|
||||
var typeBarredFromConstraintValidation = ["hidden", "button", "reset", "submit", "image"];
|
||||
for each (type in typeRequireNotApply) {
|
||||
checkInputRequiredNotApply(type, true);
|
||||
}
|
||||
|
||||
// Then, checks for the types which do not use the required attribute.
|
||||
// TODO: check 'color' and 'range' when they will be implemented.
|
||||
var typeRequireNotApply = ["submit", "image"];
|
||||
var typeRequireNotApply = [];
|
||||
for each (type in typeRequireNotApply) {
|
||||
checkInputRequiredNotApply(type, false);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ var elements = [ "input", "button", "select", "textarea", "fieldset", "option",
|
||||
var testData = {
|
||||
/* tag name | affected by disabled | test focus | test pseudo-classes | test willValidate */
|
||||
"INPUT": [ true, true, true, true, true ],
|
||||
"BUTTON": [ true, true, true, true, false ],
|
||||
"BUTTON": [ true, true, true, false, false ],
|
||||
"SELECT": [ true, true, true, true, false ],
|
||||
"TEXTAREA": [ true, true, true, true, true ],
|
||||
"FIELDSET": [ true, true, true, false, false ],
|
||||
|
@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=600155
|
||||
|
||||
/** Test for Bug 600155 **/
|
||||
|
||||
var subjectForConstraintValidation = [ "button", "input", "select", "textarea" ];
|
||||
var subjectForConstraintValidation = [ "input", "select", "textarea" ];
|
||||
var content = document.getElementById('content');
|
||||
|
||||
for each (var eName in subjectForConstraintValidation) {
|
||||
|
@ -12,5 +12,4 @@
|
||||
== remove-submit-control.html valid-ref-3.html
|
||||
== change-type-submit-control.html invalid-ref.html
|
||||
== change-type-not-submit-control.html valid-ref-4.html
|
||||
== self-invalid.html about:blank
|
||||
== remove-form.html invalid-ref-3.html
|
||||
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class='reftest-wait'>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-submit-invalid { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<script>
|
||||
function onloadHandler()
|
||||
{
|
||||
document.getElementById('b').setCustomValidity('foo');
|
||||
document.documentElement.className = '';
|
||||
}
|
||||
</script>
|
||||
<body onload='onloadHandler();'>
|
||||
<form>
|
||||
<button id='b' type='submit'></button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -12,5 +12,4 @@
|
||||
== remove-submit-control.html valid-ref-3.html
|
||||
== change-type-submit-control.html invalid-ref.html
|
||||
== change-type-not-submit-control.html valid-ref-4.html
|
||||
== self-invalid.html about:blank
|
||||
== remove-form.html invalid-ref-3.html
|
||||
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class='reftest-wait'>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-submit-invalid { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<script>
|
||||
function onloadHandler()
|
||||
{
|
||||
document.getElementById('i').setCustomValidity('foo');
|
||||
document.documentElement.className = '';
|
||||
}
|
||||
</script>
|
||||
<body onload='onloadHandler();'>
|
||||
<form>
|
||||
<input id='i' type='image'>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -12,5 +12,4 @@
|
||||
== remove-submit-control.html valid-ref-3.html
|
||||
== change-type-submit-control.html invalid-ref.html
|
||||
== change-type-not-submit-control.html valid-ref-4.html
|
||||
== self-invalid.html about:blank
|
||||
== remove-form.html invalid-ref-3.html
|
||||
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class='reftest-wait'>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-submit-invalid { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<script>
|
||||
function onloadHandler()
|
||||
{
|
||||
document.getElementById('i').setCustomValidity('foo');
|
||||
document.documentElement.className = '';
|
||||
}
|
||||
</script>
|
||||
<body onload='onloadHandler();'>
|
||||
<form>
|
||||
<input id='i' type='submit'>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
<!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>
|
@ -1,22 +0,0 @@
|
||||
<!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>
|
@ -1,25 +0,0 @@
|
||||
<!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>
|
@ -1,9 +0,0 @@
|
||||
<!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>
|
@ -1,18 +0,0 @@
|
||||
<!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 :-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');
|
||||
e.disabled = 'true';
|
||||
document.documentElement.className='';
|
||||
}
|
||||
</script>
|
||||
<body onload="onLoadHandler();">
|
||||
<button class='notinvalid' id='b'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
<!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 :-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');
|
||||
e.removeAttribute('disabled');
|
||||
document.documentElement.className='';
|
||||
}
|
||||
</script>
|
||||
<body onload="onLoadHandler();">
|
||||
<button class='invalid' id='b' disabled></button>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<button style="background-color: green;"></button>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,22 +0,0 @@
|
||||
<!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>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<fieldset>
|
||||
<fieldset>
|
||||
<button style="background-color: green;"></button>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- Test: if button has a custom error, it should not be affected by :-moz-ui-invalid
|
||||
pseudo-class. -->
|
||||
<!-- Test: button elemnet is never affected by :-moz-ui-invalid. -->
|
||||
<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>
|
||||
<button class='notinvalid' id='b'></button>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,10 +0,0 @@
|
||||
<!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>
|
@ -1,9 +0,0 @@
|
||||
<!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>
|
@ -1,19 +0,0 @@
|
||||
<!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 :-moz-ui-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>
|
@ -1,19 +0,0 @@
|
||||
<!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 :-moz-ui-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>
|
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button has no custom error and is not barred from constraint
|
||||
validation, it should be affected by :-moz-ui-invalid pseudo-class. -->
|
||||
<!-- Test: button elemnet is never affected by :-moz-ui-invalid. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='notinvalid'</button>
|
||||
|
@ -1,13 +1,2 @@
|
||||
== button-valid.html button-ref.html
|
||||
== button-invalid.html button-ref.html
|
||||
== button-disabled.html button-ref.html
|
||||
== button-dyn-disabled.html button-ref.html
|
||||
== button-dyn-not-disabled.html button-ref.html
|
||||
== button-button.html button-ref.html
|
||||
== button-reset.html button-ref.html
|
||||
== button-type-invalid.html button-ref.html
|
||||
== button-type-barred.html button-ref.html
|
||||
== button-disabled-fieldset-1.html button-fieldset-ref.html
|
||||
== button-disabled-fieldset-2.html button-fieldset-ref.html
|
||||
== button-fieldset-legend.html button-fieldset-legend-ref.html
|
||||
== button-novalidate.html button-ref.html
|
||||
|
@ -2,6 +2,6 @@
|
||||
<html class="reftest-wait">
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementsByTagName('button')[0].focus();">
|
||||
<button class='invalid-ref' onfocus="document.documentElement.className='';"></button>
|
||||
<button class='barred-ref' onfocus="document.documentElement.className='';"></button>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2,6 +2,6 @@
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='invalid-ref'></button>
|
||||
<button class='barred-ref'></button>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button is of the button type, it is barred from constraint
|
||||
validation and should not be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='notvalid' type='button'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button has a disabled fieldset ancestor, it is barred from
|
||||
constraint validation and should not be affected by :-moz-ui-valid
|
||||
pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<fieldset disabled>
|
||||
<fieldset>
|
||||
<button class='notvalid'></button>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
<!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-valid
|
||||
pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<script>
|
||||
function onloadHandler()
|
||||
{
|
||||
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='notvalid'></button>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button is disabled, it is barred from constraint validation
|
||||
and should not be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='notvalid' disabled></button>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- Test: if button is disabled, it is barred from constraint validation
|
||||
and should not be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('b').disabled='true'; document.documentElement.className='';">
|
||||
<button class='notvalid' id='b'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- Test: if button is not disabled, it is candidate for constraint validation
|
||||
and should be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('b').removeAttribute('disabled'); document.documentElement.className='';">
|
||||
<button class='valid' id='b' disabled></button>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<button style="background-color: green;"></button>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- 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-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<fieldset disabled>
|
||||
<legend>
|
||||
<button class='valid'></button>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<fieldset>
|
||||
<fieldset>
|
||||
<button style="background-color: green;"></button>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- Test: if button has a custom error, it should not be affected by :-moz-ui-valid
|
||||
pseudo-class. -->
|
||||
<!-- Test: button elemnet is never affected by :-moz-ui-valid. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('b').setCustomValidity('foo'); document.documentElement.className='';">
|
||||
<button class='notvalid' id='b'></button>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<form novalidate>
|
||||
<button class='notvalid'></button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button is of the reset type, it is barred from constraint
|
||||
validation and should not be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='notvalid' type='reset'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!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 :-moz-ui-valid pseudo-class. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body onload="document.getElementById('b').type='button'; document.documentElement.className='';">
|
||||
<button class='notvalid' type='submit' id='b'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
<!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 :-moz-ui-valid 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='notvalid' type='button' id='b'></button>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!-- Test: if button has no custom error and is not barred from constraint
|
||||
validation, it should be affected by :-moz-ui-valid pseudo-class. -->
|
||||
<!-- Test: button element is never affected by :-moz-ui-valid. -->
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
<body>
|
||||
<button class='valid'></button>
|
||||
<button class='notvalid'></button>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,13 +1,2 @@
|
||||
== button-valid.html button-ref.html
|
||||
== button-invalid.html button-ref.html
|
||||
== button-disabled.html button-ref.html
|
||||
== button-dyn-disabled.html button-ref.html
|
||||
== button-dyn-not-disabled.html button-ref.html
|
||||
== button-button.html button-ref.html
|
||||
== button-reset.html button-ref.html
|
||||
== button-type-invalid.html button-ref.html
|
||||
== button-type-barred.html button-ref.html
|
||||
== button-disabled-fieldset-1.html button-fieldset-ref.html
|
||||
== button-disabled-fieldset-2.html button-fieldset-ref.html
|
||||
== button-fieldset-legend.html button-fieldset-legend-ref.html
|
||||
== button-novalidate.html button-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user