Changeset 86534 in webkit
- Timestamp:
- May 16, 2011 12:01:28 AM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86527 r86534 1 2011-05-12 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Darin Adler. 4 5 Move mediaControlsButtonCoordinates() out of video-test.js 6 https://bugs.webkit.org/show_bug.cgi?id=60693 7 8 Moved the function to a new js file called media-controls.js. Also 9 made the function throw an exception if the button is not found 10 and handle the exception in the various tests using the function. 11 12 * media/audio-delete-while-step-button-clicked.html: 13 * media/media-controls.js: Added. 14 (mediaControlsButtonCoordinates): 15 * media/video-controls-transformed.html: 16 * media/video-controls-visible-audio-only.html: 17 * media/video-controls-zoomed.html: 18 * media/video-test.js: 19 (isInTimeRanges): 20 1 21 2011-05-15 MORITA Hajime <morrita@google.com> 2 22 -
trunk/LayoutTests/media/audio-delete-while-step-button-clicked.html
r85934 r86534 4 4 <script src=media-file.js></script> 5 5 <script src=video-test.js></script> 6 <script src=media-controls.js></script> 7 6 8 <script> 7 9 if (window.layoutTestController) { … … 52 54 var audio = document.getElementById('audio'); 53 55 54 var seekCoords = mediaControlsButtonCoordinates(audio, "seek-forward-button"); 56 try { 57 var seekCoords = mediaControlsButtonCoordinates(audio, "seek-forward-button"); 58 } catch (exception) { 59 failTest(exception.description); 60 } 55 61 var x = seekCoords[0]; 56 62 var y = seekCoords[1]; -
trunk/LayoutTests/media/video-controls-transformed.html
r85934 r86534 15 15 <script src=media-file.js></script> 16 16 <script src=video-test.js></script> 17 <script src=media-controls.js></script> 17 18 <script> 18 19 testExpected("video.controls", null, '!='); … … 20 21 if (window.eventSender) { 21 22 // Find the play button and click the middle of its bounding box. 22 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 23 try { 24 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 25 } catch (exception) { 26 failTest(exception.description); 27 } 23 28 var clickX = playCoords[0]; 24 29 var clickY = playCoords[1]; -
trunk/LayoutTests/media/video-controls-visible-audio-only.html
r85934 r86534 7 7 </style> 8 8 <script src=media-file.js></script> 9 <script src= video-test.js></script>9 <script src=media-controls.js></script> 10 10 <script> 11 11 if (window.layoutTestController) { … … 39 39 40 40 // start playback 41 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 41 try { 42 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 43 } catch (exception) { 44 consoleWrite(exception.description); 45 layoutTestController.notifyDone(); 46 } 42 47 var clickX = playCoords[0]; 43 48 var clickY = playCoords[1]; -
trunk/LayoutTests/media/video-controls-zoomed.html
r85934 r86534 8 8 </style> 9 9 <script src=media-file.js></script> 10 <script src=media-controls.js></script> 10 11 <script type="text/javascript" charset="utf-8"> 11 12 function runTest() … … 21 22 { 22 23 // Find the play button and click the middle of its bounding box. 23 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 24 try { 25 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 26 } catch (exception) { 27 failTest(exception.description); 28 } 24 29 var clickX = playCoords[0]; 25 30 var clickY = playCoords[1]; -
trunk/LayoutTests/media/video-test.js
r85934 r86534 236 236 return false; 237 237 } 238 239 function mediaControlsButtonCoordinates(element, id)240 {241 var button;242 var controlsShadow = layoutTestController.shadowRoot(element).firstChild.firstChild;243 for (child = controlsShadow.firstChild; child; child = child.nextSibling) {244 if (layoutTestController.shadowPseudoId(child) == "-webkit-media-controls-" + id) {245 button = child;246 break;247 }248 }249 250 if (!button)251 failTest("Failed to find " + id + " button.");252 253 var buttonBoundingRect = button.getBoundingClientRect();254 var x = buttonBoundingRect.left + buttonBoundingRect.width / 2;255 var y = buttonBoundingRect.top + buttonBoundingRect.height / 2;256 return new Array(x, y);257 }
Note: See TracChangeset
for help on using the changeset viewer.