Changeset 85934 in webkit
- Timestamp:
- May 6, 2011 1:00:43 AM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85932 r85934 1 2011-05-03 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 Layout tests shouldn't have to hard code media controller element locations 6 https://bugs.webkit.org/show_bug.cgi?id=28220 7 8 New mediaControlsButtonCoordinates() function to get the middle 9 coordinates of a media controls button. This avoids hardcoding 10 positions in the tests. 11 12 Also unskipped the affected GTK media tests now passing. 13 14 * media/audio-delete-while-step-button-clicked.html: 15 * media/video-controls-transformed.html: 16 * media/video-controls-zoomed.html: 17 * media/video-test.js: 18 (mediaControlsButtonCoordinates): 19 * platform/gtk/Skipped: 20 1 21 2011-05-06 MORITA Hajime <morrita@google.com> 2 22 -
trunk/LayoutTests/media/audio-delete-while-step-button-clicked.html
r79630 r85934 3 3 <head> 4 4 <script src=media-file.js></script> 5 <script src=video-test.js></script> 5 6 <script> 6 7 if (window.layoutTestController) { … … 51 52 var audio = document.getElementById('audio'); 52 53 53 var right = audio.offsetLeft + audio.offsetWidth; 54 var bottom = audio.offsetTop + audio.offsetHeight; 55 56 var x = right - 8; 57 var y = bottom - 8; 54 var seekCoords = mediaControlsButtonCoordinates(audio, "seek-forward-button"); 55 var x = seekCoords[0]; 56 var y = seekCoords[1]; 58 57 59 58 // step forward, should generate a timeupdate event -
trunk/LayoutTests/media/video-controls-transformed.html
r85925 r85934 20 20 if (window.eventSender) { 21 21 // Find the play button and click the middle of its bounding box. 22 var playButton; 23 var controlsShadow = layoutTestController.shadowRoot(video).firstChild.firstChild; 24 for (child = controlsShadow.firstChild; child; child = child.nextSibling) { 25 if (layoutTestController.shadowPseudoId(child) == "-webkit-media-controls-play-button") { 26 playButton = child; 27 break; 28 } 29 } 30 31 if (!playButton) { 32 failTest("Failed to find play/pause button."); 33 } 34 var playButtonBoundingRect = playButton.getBoundingClientRect(); 35 var clickX = playButtonBoundingRect.left + playButtonBoundingRect.width / 2; 36 var clickY = playButtonBoundingRect.top + playButtonBoundingRect.height / 2; 22 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 23 var clickX = playCoords[0]; 24 var clickY = playCoords[1]; 37 25 eventSender.mouseMoveTo(clickX, clickY); 38 26 eventSender.mouseDown(); -
trunk/LayoutTests/media/video-controls-visible-audio-only.html
r79630 r85934 7 7 </style> 8 8 <script src=media-file.js></script> 9 <script src=video-test.js></script> 9 10 <script> 10 11 if (window.layoutTestController) { … … 32 33 { 33 34 video = document.getElementById("no-video-media"); 34 var left = video.offsetLeft;35 var bottom = video.offsetTop + video.offsetHeight;36 35 37 36 testcondition("video.paused"); … … 40 39 41 40 // start playback 42 eventSender.mouseMoveTo(left + 8, bottom - 8); 41 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 42 var clickX = playCoords[0]; 43 var clickY = playCoords[1]; 44 eventSender.mouseMoveTo(clickX, clickY); 43 45 eventSender.mouseDown(); 44 46 eventSender.mouseUp(); -
trunk/LayoutTests/media/video-controls-zoomed.html
r79630 r85934 13 13 window.setTimeout(function() { 14 14 document.documentElement.style.zoom = '150%'; 15 if (window.eventSender) 15 video.addEventListener("playing", function() { 16 testExpected("video.paused", false); 17 endTest(); 18 }); 19 20 if (window.eventSender) 16 21 { 17 eventSender.mouseMoveTo(120,432); // over play button 22 // Find the play button and click the middle of its bounding box. 23 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 24 var clickX = playCoords[0]; 25 var clickY = playCoords[1]; 26 27 // Apply the page zoom value to the coordinates because 28 // getBoundingClientRect() used in 29 // mediaControlsButtonCoordinates() doesn't do it. 30 clickX = clickX * 1.5; 31 clickY = clickY * 1.5; 32 33 eventSender.mouseMoveTo(clickX, clickY); 18 34 eventSender.mouseDown(); 19 35 eventSender.mouseUp(); 20 36 } 21 testExpected("video.paused", false);22 endTest();23 37 }, 50); 24 38 } -
trunk/LayoutTests/media/video-test.js
r79949 r85934 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 } -
trunk/LayoutTests/platform/gtk/Skipped
r85784 r85934 565 565 # Tests in media/ directory 566 566 # Tests failing 567 media/video-controls-zoomed.html568 567 media/video-size-intrinsic-scale.html 569 568 media/video-seek-past-end-playing.html … … 640 639 http/tests/security/mixedContent/insecure-plugin-in-iframe.html 641 640 http/tests/loading/basic-auth-resend-wrong-credentials.html 642 643 # https://bugs.webkit.org/show_bug.cgi?id=30680644 media/audio-delete-while-step-button-clicked.html645 641 646 642 # https://bugs.webkit.org/show_bug.cgi?id=30620
Note: See TracChangeset
for help on using the changeset viewer.