| Test 'muted' content attribute |
| |
| |
| |
| *** Test with 'muted' content attribute |
| |
| RUN(video = document.createElement('video')) |
| RUN(video.setAttribute('controls', 'controls')) |
| RUN(video.setAttribute('muted', 'muted')) |
| |
| *** Test before setting src, muted IDL attribute should default to muted content attribute |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| |
| EVENT(loadedmetadata) |
| |
| *** Change 'defaultMuted', IDL attribute should not change but content attribute should. |
| RUN(video.defaultMuted = false) |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| EXPECTED (video.hasAttribute('muted') == 'false') OK |
| |
| *** Change 'muted' IDL attribute, content attribute should not change |
| RUN(video.muted = false) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| EXPECTED (video.hasAttribute('muted') == 'false') OK |
| |
| *** Remove 'muted' content attribute, it should have no effect on IDL attribute |
| RUN(video.removeAttribute('muted')) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| |
| *** Test without 'muted' content attribute |
| |
| RUN(video = document.createElement('video')) |
| RUN(video.setAttribute('controls', 'controls')) |
| |
| *** Test before setting src, muted IDL attribute should default to muted content attribute |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| EVENT(loadedmetadata) |
| |
| *** Change 'defaultMuted', IDL attribute should not change but content attribute should. |
| RUN(video.defaultMuted = true) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| EXPECTED (video.hasAttribute('muted') == 'true') OK |
| |
| *** Change 'muted' IDL attribute, content attribute should not change |
| RUN(video.muted = false) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| EXPECTED (video.hasAttribute('muted') == 'true') OK |
| |
| *** Add 'muted' content attribute, it should have no effect on IDL attribute |
| RUN(video.setAttribute('muted', 'muted')) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| |
| |
| *** Test that the 'muted' content attribute reflects the 'muted' IDL attribute before the element is added to the document, and does not reflect after |
| |
| RUN(video = document.createElement('video')) |
| RUN(video.setAttribute('controls', 'controls')) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| *** Change 'muted' content attribute, IDL attribute should change. |
| RUN(video.setAttribute('muted', 'muted')) |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| RUN(document.getElementById('parent').appendChild(video)) |
| |
| *** Change 'muted' content attribute, IDL attribute should not change. |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| |
| *** Test that setting the 'muted' IDL attribute means that changes to the 'muted' content attribute are no longer reflected. |
| |
| RUN(video = document.createElement('video')) |
| RUN(video.setAttribute('controls', 'controls')) |
| EXPECTED (video.muted == 'false') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| *** Change 'muted' content attribute, IDL attribute should change. |
| RUN(video.setAttribute('muted', 'muted')) |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'true') OK |
| |
| *** Change 'muted' IDL attribute, then the content attribute. IDL attribute should not change. |
| RUN(video.muted = true) |
| EXPECTED (video.muted == 'true') OK |
| EXPECTED (video.defaultMuted == 'false') OK |
| |
| END OF TEST |
| |