Changeset 211174 in webkit
- Timestamp:
- Jan 25, 2017 3:43:01 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r211147 r211174 1 2017-01-25 Matt Rajca <mrajca@apple.com> 2 3 [ios-simulator] API test WebKit2.WebsitePoliciesAutoplayEnabled timing out 4 https://bugs.webkit.org/show_bug.cgi?id=167385 5 6 Reviewed by Alex Christensen. 7 8 * TestWebKitAPI/Tests/WebKit2/autoplay-check.html: Avoid arbitrary timeouts in favor of promises. 9 * TestWebKitAPI/Tests/WebKit2/autoplay-no-audio-check.html: 10 * TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm: 11 (TEST): Allow inline (rather than full screen) media playback on iOS. 12 1 13 2017-01-25 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check.html
r211097 r211174 3 3 <script> 4 4 function pageLoaded() { 5 setTimeout(function() { 5 document.getElementById("video").play().then(function() { 6 try { 7 window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); 8 } catch(e) { } 9 }).catch(function() { 6 10 try { 7 11 window.webkit.messageHandlers.testHandler.postMessage("did-not-play"); 8 12 } catch(e) { } 9 }, 100); 10 } 11 12 function beganPlaying() { 13 try { 14 window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); 15 } catch(e) { } 13 }); 16 14 } 17 15 </script> 18 16 </head> 19 17 <body onload="pageLoaded()"> 20 <video id="video" autoplay onplaying=beganPlaying()src="test.mp4" />18 <video id="video" playsinline src="test.mp4" /> 21 19 </body> 22 20 </html> -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-no-audio-check.html
r211097 r211174 3 3 <script> 4 4 function pageLoaded() { 5 setTimeout(function() { 5 document.getElementById("video").play().then(function() { 6 try { 7 window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); 8 } catch(e) { } 9 }).catch(function() { 6 10 try { 7 11 window.webkit.messageHandlers.testHandler.postMessage("did-not-play"); 8 12 } catch(e) { } 9 }, 100); 10 } 11 12 function beganPlaying() { 13 try { 14 window.webkit.messageHandlers.testHandler.postMessage("autoplayed"); 15 } catch(e) { } 13 }); 16 14 } 17 15 </script> 18 16 </head> 19 17 <body onload="pageLoaded()"> 20 <video id="video" autoplay onplaying=beganPlaying()src="test-without-audio-track.mp4" />18 <video id="video" playsinline src="test-without-audio-track.mp4" /> 21 19 </body> 22 20 </html> -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm
r211097 r211174 34 34 #import <wtf/RetainPtr.h> 35 35 36 #if PLATFORM(IOS) 37 #import <WebKit/WKWebViewConfigurationPrivate.h> 38 #endif 39 36 40 #if WK_API_ENABLED 37 41 … … 175 179 { 176 180 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); 181 182 #if PLATFORM(IOS) 183 [configuration setAllowsInlineMediaPlayback:YES]; 184 #endif 185 177 186 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); 178 187
Note: See TracChangeset
for help on using the changeset viewer.