| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <title>Test that the controls attribute is not affected by fullscreen</title> |
| 3 <head> | 3 <script src="../resources/testharness.js"></script> |
| 4 <title>Test that the controls attribute is not affected by fullscreen</t
itle> | 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <script src="media-file.js"></script> | 5 <script src="media-file.js"></script> |
| 6 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 6 <video></video> |
| 7 (Please avoid writing new tests using video-test.js) --> | 7 <script> |
| 8 <script src="video-test.js"></script> | 8 async_test(function(t) { |
| 9 <script> | 9 var video = document.querySelector("video"); |
| 10 function start() | 10 video.src = findMediaFile("video", "content/test"); |
| 11 { | 11 video.onloadeddata = t.step_func(function() { |
| 12 findMediaElement(); | 12 assert_false(video.controls); |
| 13 video.src = findMediaFile("video", "content/test"); | 13 video.onwebkitfullscreenchange = t.step_func_done(function() { |
| 14 waitForEvent("loadeddata", loadeddata); | 14 assert_false(video.controls); |
| 15 } | 15 }); |
| 16 | 16 |
| 17 function loadeddata() | 17 document.onclick = t.step_func(function() { |
| 18 { | 18 video.webkitRequestFullscreen(); |
| 19 testExpected("video.controls", false); | 19 }); |
| 20 waitForEventOnce("webkitfullscreenchange", fullscreenchange); | 20 eventSender.mouseDown(); |
| 21 document.addEventListener("click", function() | 21 eventSender.mouseUp(); |
| 22 { | 22 }); |
| 23 run("video.webkitRequestFullscreen()"); | 23 }); |
| 24 }); | 24 </script> |
| 25 eventSender.mouseDown(); | |
| 26 eventSender.mouseUp(); | |
| 27 } | |
| 28 | |
| 29 function fullscreenchange() | |
| 30 { | |
| 31 testExpected("video.controls", false); | |
| 32 endTest(); | |
| 33 } | |
| 34 </script> | |
| 35 </head> | |
| 36 <body onload="start()"> | |
| 37 <p>Test that the controls attribute is not affected by fullscreen</p> | |
| 38 <video></video> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |