| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test controls on transformed video</title> | 3 <title>Test controls on transformed video</title> |
| 4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
| 5 video { | 5 video { |
| 6 margin: 50px; | 6 margin: 50px; |
| 7 transform: rotate(20deg); | 7 transform: rotate(20deg); |
| 8 } | 8 } |
| 9 </style> | 9 </style> |
| 10 </head> | 10 </head> |
| 11 <body> | 11 <body> |
| 12 <video controls></video> | 12 <video controls></video> |
| 13 <p>Test controls on transformed video.</p> | 13 <p>Test controls on transformed video.</p> |
| 14 <p>This test only runs in DRT!</p> | 14 <p>This test only runs in DRT!</p> |
| 15 <script src=media-file.js></script> | 15 <script src=media-file.js></script> |
| 16 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 17 (Please avoid writing new tests using video-test.js) --> |
| 16 <script src=video-test.js></script> | 18 <script src=video-test.js></script> |
| 17 <script src=media-controls.js></script> | 19 <script src=media-controls.js></script> |
| 18 <script> | 20 <script> |
| 19 testExpected("video.controls", null, '!='); | 21 testExpected("video.controls", null, '!='); |
| 20 waitForEvent('canplaythrough', function () { | 22 waitForEvent('canplaythrough', function () { |
| 21 if (window.eventSender) { | 23 if (window.eventSender) { |
| 22 // Find the play button and click the middle of its bounding box
. | 24 // Find the play button and click the middle of its bounding box
. |
| 23 var playCoords; | 25 var playCoords; |
| 24 try { | 26 try { |
| 25 playCoords = mediaControlsButtonCoordinates(video, "play-but
ton"); | 27 playCoords = mediaControlsButtonCoordinates(video, "play-but
ton"); |
| 26 } catch (exception) { | 28 } catch (exception) { |
| 27 failTest(exception.description); | 29 failTest(exception.description); |
| 28 return; | 30 return; |
| 29 } | 31 } |
| 30 var clickX = playCoords[0]; | 32 var clickX = playCoords[0]; |
| 31 var clickY = playCoords[1]; | 33 var clickY = playCoords[1]; |
| 32 eventSender.mouseMoveTo(clickX, clickY); | 34 eventSender.mouseMoveTo(clickX, clickY); |
| 33 eventSender.mouseDown(); | 35 eventSender.mouseDown(); |
| 34 eventSender.mouseUp(); | 36 eventSender.mouseUp(); |
| 35 } | 37 } |
| 36 testExpected("video.paused", false); | 38 testExpected("video.paused", false); |
| 37 endTest(); | 39 endTest(); |
| 38 } ); | 40 } ); |
| 39 video.src = findMediaFile("video", "content/test"); | 41 video.src = findMediaFile("video", "content/test"); |
| 40 </script> | 42 </script> |
| 41 </body> | 43 </body> |
| 42 </html> | 44 </html> |
| OLD | NEW |