blob: 74623e4240bcc1dca41816e5e0741bebe413ee0a [file] [log] [blame]
Tests for assigning the value attribute to output elements.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
- Sets the defaultValue attribute with the value mode flag is in mode "defalut".
PASS output.defaultValue is "defaultValue"
PASS output.value is "defaultValue"
PASS output.innerText is "defaultValue"
PASS output.innerHTML is "defaultValue"
- Sets the value attribute. This will change the value mode flag from "default" to "value".
PASS output.defaultValue is "defaultValue"
PASS output.value is "aValue"
PASS output.innerText is "aValue"
PASS output.innerHTML is "aValue"
- Sets the defaultValue attribute with the value mode flag is in mode "value".
PASS output.defaultValue is "another defaultValue"
PASS output.value is "aValue"
PASS output.innerText is "aValue"
PASS output.innerHTML is "aValue"
- Ensures that setting text to the value attribute works as setTextContent().
PASS output.value is '<strong>A <span style="color: red;">strong</span> text</strong>'
PASS output.innerText is '<strong>A <span style="color: red;">strong</span> text</strong>'
PASS output.innerHTML is '&lt;strong&gt;A &lt;span style="color: red;"&gt;strong&lt;/span&gt; text&lt;/strong&gt;'
- Sets the innerText attribute with the value mode flag is in mode "default".
PASS output.defaultValue is "text"
PASS output.value is "text"
PASS output.innerText is "text"
PASS output.innerHTML is "text"
PASS output.defaultValue is "<strong>strong</strong> text"
PASS output.value is "<strong>strong</strong> text"
PASS output.innerText is "<strong>strong</strong> text"
PASS output.innerHTML is "&lt;strong&gt;strong&lt;/strong&gt; text"
- Sets the innerText attribute with the value mode flag is in mode "value".
PASS output.defaultValue is "defaultValue"
PASS output.value is "text"
PASS output.innerText is "text"
PASS output.innerHTML is "text"
- Sets the innerHTML attribute with the value mode flag is in mode "default".
PASS output.defaultValue is "text"
PASS output.value is "text"
PASS output.innerText is "text"
PASS output.innerHTML is "text"
PASS output.defaultValue is "strong text"
PASS output.value is "strong text"
PASS output.innerText is "strong text"
PASS output.innerHTML is "<strong>strong</strong> text"
- Sets the innerHTML attribute with the value mode flag is in mode "value".
PASS output.defaultValue is "defaultValue"
PASS output.value is "text"
PASS output.innerText is "text"
PASS output.innerHTML is "text"
PASS output.defaultValue is "defaultValue"
PASS output.value is "strong text"
PASS output.innerText is "strong text"
PASS output.innerHTML is "<strong>strong</strong> text"
- Appends a child node to the output element with the value mode flag is in mode "default".
PASS output.defaultValue is "childText"
PASS output.value is "childText"
PASS output.innerText is "childText"
PASS output.innerHTML is "<span>childText</span>"
- Then removes the child node from the output element with the value mode flag is in mode "default".
PASS output.defaultValue is ""
PASS output.value is ""
PASS output.innerText is ""
PASS output.innerHTML is ""
- Appends a child node to the output element with the value mode flag is in mode "value".
PASS output.defaultValue is "defaultValue"
PASS output.value is "aValue and childText"
PASS output.innerText is "aValue and childText"
PASS output.innerHTML is "aValue<span> and childText</span>"
- Then removes the child node from the output element with the value mode flag is in mode "default".
PASS output.defaultValue is "defaultValue"
PASS output.value is "aValue"
PASS output.innerText is "aValue"
PASS output.innerHTML is "aValue"
PASS successfullyParsed is true
TEST COMPLETE