blob: 93182550a6af080b52fafd9c0451f5c794a179d8 [file] [log] [blame]
Tests for HTMLFieldSetElement.disabled behavior.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Verifying parser generated fieldsets.
PASS parserGeneratedInput1.value is "L"
PASS parserGeneratedInput2.value is "M"
PASS parserGeneratedInput3.value is "NO"
PASS parserGeneratedInput4.value is ""
PASS parserGeneratedInput5.value is "PQRST"
PASS parserGeneratedInput6.value is ""
PASS parserGeneratedInput7.value is ""
PASS parserGeneratedInput8.value is ""
PASS parserGeneratedInput9.value is ""
Testing a single fieldset element.
Verifying HTMLFormControl can be disabled regardless of enclosing fieldset.
PASS textInput.disabled is true
PASS textInput.value is ""
PASS fieldSet.disabled is false
Fieldset is enabled by default. A user can insertText into the text input field.
PASS textInput.value is "A"
Disable fieldset.
PASS fieldSet.disabled is true
Once the fieldset is disabled, text cannot be inserted.
PASS textInput.value is "A"
Check if the style of the text element changed.
PASS getComputedStyle(textInput).backgroundColor is 'rgb(255, 0, 0)'
Enable fieldset.
PASS fieldSet.disabled is false
PASS getComputedStyle(textInput).backgroundColor is 'rgb(255, 255, 100)'
PASS textInput.value is "AB"
Move the textinput element out of the fieldset.
Disable the fieldset.
PASS fieldSet.disabled is true
Text can be inserted, because the textinput element is outside of the disabled fieldset.
PASS textInput.value is "ABC"
Enable the fieldset.
PASS fieldSet.disabled is false
Insert a table into the fieldset.
Move the textinput field into the table.
PASS textInput.value is "ABCD"
Disable the fieldset.
PASS fieldSet.disabled is true
Inserting text should fail.
PASS textInput.value is "ABCD"
Enable the fieldset.
PASS fieldSet.disabled is false
PASS textInput.value is "ABCDE"
Testing nested fieldset elements.
Verifying that subordinates of both fieldsets are enabled.
PASS outerTextInput.value is "F"
PASS innerTextInput.value is "F"
Disabling the inner fieldset only.
PASS innerFieldSet.disabled is true
PASS outerTextInput.value is "FGG"
PASS innerTextInput.value is "F"
Enabling the inner and disabling the outer fieldset.
PASS outerFieldSet.disabled is true
PASS innerFieldSet.disabled is false
PASS outerTextInput.value is "FGG"
PASS innerTextInput.value is "F"
Disabling both fieldset elements.
PASS outerFieldSet.disabled is true
PASS innerFieldSet.disabled is true
PASS outerTextInput.value is "FGG"
PASS innerTextInput.value is "F"
Enabling both fieldset elements.
PASS outerFieldSet.disabled is false
PASS innerFieldSet.disabled is false
PASS outerTextInput.value is "FGGH"
PASS innerTextInput.value is "FH"
Test behavior of the first legend element in a fieldset elements.
Children of the first legend element in a fieldset should not get disabled with the fieldset.
PASS legendFieldSet.disabled is true
PASS firstLegendTextInput.value is "II"
PASS secondLegendTextInput.value is ""
Insert another legend element before the currently first one, and check again.
PASS insertedLegendTextInput.value is "JJJ"
PASS firstLegendTextInput.value is "II"
PASS secondLegendTextInput.value is ""
Enable the fieldset again and check for sanity.
PASS legendFieldSet.disabled is false
PASS insertedLegendTextInput.value is "JJJK"
PASS firstLegendTextInput.value is "IIK"
PASS secondLegendTextInput.value is "K"
PASS successfullyParsed is true
TEST COMPLETE