OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Test rendering of volume slider of video tag</title> | 3 <title>Test rendering of volume slider of video tag</title> |
4 <script src=media-file.js></script> | 4 <script src=media-file.js></script> |
5 <script src=media-controls.js></script> | 5 <script src=media-controls.js></script> |
6 <script src=video-test.js></script> | 6 <script src=video-test.js></script> |
7 <script> | 7 <script> |
8 var video; | 8 var video; |
9 var panel; | 9 var panel; |
10 var muteButtonCoordinates; | 10 var muteButtonCoordinates; |
11 var fadeoutTime = 300; | |
12 | 11 |
13 function init() | 12 function init() |
14 { | 13 { |
15 video = document.getElementsByTagName("video")[0]; | 14 video = document.getElementsByTagName("video")[0]; |
16 video.src = findMediaFile("video", "content/test"); | 15 video.src = findMediaFile("video", "content/test"); |
17 | 16 |
18 consoleWrite(""); | 17 consoleWrite(""); |
19 consoleWrite("** Playing the video **"); | 18 consoleWrite("** Playing the video **"); |
20 run("video.play()"); | 19 run("video.play()"); |
21 } | 20 } |
(...skipping 18 matching lines...) Expand all Loading... |
40 consoleWrite(""); | 39 consoleWrite(""); |
41 consoleWrite("** Test that controls are shown when controls attribut
e is present **"); | 40 consoleWrite("** Test that controls are shown when controls attribut
e is present **"); |
42 testExpected("panel.style['display']", 'none', "!="); | 41 testExpected("panel.style['display']", 'none', "!="); |
43 | 42 |
44 if (window.eventSender) { | 43 if (window.eventSender) { |
45 consoleWrite(""); | 44 consoleWrite(""); |
46 consoleWrite("** Move mouse outside the video **"); | 45 consoleWrite("** Move mouse outside the video **"); |
47 run("eventSender.mouseMoveTo(video.offsetLeft, video.offsetTop +
2 * video.offsetHeight)"); | 46 run("eventSender.mouseMoveTo(video.offsetLeft, video.offsetTop +
2 * video.offsetHeight)"); |
48 } | 47 } |
49 | 48 |
50 setTimeout(continueTest, fadeoutTime); | 49 setTimeout(continueTest, controlsFadeOutDurationMs); |
51 } | 50 } |
52 | 51 |
53 function continueTest() | 52 function continueTest() |
54 { | 53 { |
55 if (panel.style['display'] != 'none') { | 54 if (panel.style['display'] != 'none') { |
56 setTimeout(continueTest, fadeoutTime); | 55 setTimeout(continueTest, controlsFadeOutDurationMs); |
57 return; | 56 return; |
58 } | 57 } |
59 | 58 |
60 consoleWrite(""); | 59 consoleWrite(""); |
61 consoleWrite("** The controls should have the display property set t
o none"); | 60 consoleWrite("** The controls should have the display property set t
o none"); |
62 testExpected("panel.style['display']", 'none', "=="); | 61 testExpected("panel.style['display']", 'none', "=="); |
63 | 62 |
64 consoleWrite(""); | 63 consoleWrite(""); |
65 consoleWrite("** Remove controls attribute**"); | 64 consoleWrite("** Remove controls attribute**"); |
66 run("video.removeAttribute('controls')"); | 65 run("video.removeAttribute('controls')"); |
(...skipping 11 matching lines...) Expand all Loading... |
78 endTest(); | 77 endTest(); |
79 } | 78 } |
80 | 79 |
81 </script> | 80 </script> |
82 </head> | 81 </head> |
83 <body onload="init()"> | 82 <body onload="init()"> |
84 Tests that showing / hiding video controls uses the sets the display:none pr
operty<br> | 83 Tests that showing / hiding video controls uses the sets the display:none pr
operty<br> |
85 <video onplay="test()" controls></video> | 84 <video onplay="test()" controls></video> |
86 </body> | 85 </body> |
87 </html> | 86 </html> |
OLD | NEW |