Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=479863 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 479863</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=479863">Mozilla Bug 479863</a> |
michael@0 | 13 | <p id="display"></p> |
michael@0 | 14 | <div id="content" style="display: none"> |
michael@0 | 15 | |
michael@0 | 16 | </div> |
michael@0 | 17 | |
michael@0 | 18 | <video id='v1'></video><audio id='a1'></audio> |
michael@0 | 19 | <video id='v2' preload="auto"></video><audio id='a2' preload="auto"></audio> |
michael@0 | 20 | |
michael@0 | 21 | <pre id="test"> |
michael@0 | 22 | <script type="application/javascript"> |
michael@0 | 23 | var v1 = document.getElementById('v1'); |
michael@0 | 24 | var a1 = document.getElementById('a1'); |
michael@0 | 25 | var v2 = document.getElementById('v2'); |
michael@0 | 26 | var a2 = document.getElementById('a2'); |
michael@0 | 27 | is(v1.getAttribute("preload"), undefined, "video preload via getAttribute should be undefined by default"); |
michael@0 | 28 | is(a1.getAttribute("preload"), undefined, "video preload via getAttribute should be undefined by default"); |
michael@0 | 29 | is(v1.preload, "", "v1.preload should be undefined by default"); |
michael@0 | 30 | is(a1.preload, "", "a1.preload should be undefined by default"); |
michael@0 | 31 | is(v2.preload, "auto", "v2.preload should be auto"); |
michael@0 | 32 | is(a2.preload, "auto", "a2.preload should be auto"); |
michael@0 | 33 | |
michael@0 | 34 | v1.preload = "auto"; |
michael@0 | 35 | a1.preload = "auto"; |
michael@0 | 36 | is(v1.preload, "auto", "video.preload should be auto"); |
michael@0 | 37 | is(a1.preload, "auto", "audio.preload should be auto"); |
michael@0 | 38 | is(v1.getAttribute("preload"), "auto", "video preload attribute should be auto"); |
michael@0 | 39 | is(a1.getAttribute("preload"), "auto", "video preload attribute should be auto"); |
michael@0 | 40 | |
michael@0 | 41 | </script> |
michael@0 | 42 | </pre> |
michael@0 | 43 | </body> |
michael@0 | 44 | </html> |