Title: [214278] trunk/Tools
Revision
214278
Author
[email protected]
Date
2017-03-22 15:22:11 -0700 (Wed, 22 Mar 2017)

Log Message

Only run volume-related autoplay policy tests on Mac.
https://bugs.webkit.org/show_bug.cgi?id=169969

Reviewed by Alex Christensen.

iOS does not support volume changes to media elements so these tests are timing out.

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (214277 => 214278)


--- trunk/Tools/ChangeLog	2017-03-22 21:14:23 UTC (rev 214277)
+++ trunk/Tools/ChangeLog	2017-03-22 22:22:11 UTC (rev 214278)
@@ -1,3 +1,15 @@
+2017-03-22  Matt Rajca  <[email protected]>
+
+        Only run volume-related autoplay policy tests on Mac.
+        https://bugs.webkit.org/show_bug.cgi?id=169969
+
+        Reviewed by Alex Christensen.
+
+        iOS does not support volume changes to media elements so these tests are timing out.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
+        (TEST):
+
 2017-03-22  Carlos Alberto Lopez Perez  <[email protected]>
 
         [Linux] determineArchitecture is not cross-compile aware

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm (214277 => 214278)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm	2017-03-22 21:14:23 UTC (rev 214277)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm	2017-03-22 22:22:11 UTC (rev 214278)
@@ -214,8 +214,12 @@
 
     NSURLRequest *requestWithAudio = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-check" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
     NSURLRequest *requestWithoutAudio = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-no-audio-check" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+
+    // iOS does not support volume changes to media elements.
+#if PLATFORM(MAC)
     NSURLRequest *requestWithoutVolume = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-zero-volume-check" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
-    
+#endif
+
     [delegate setAutoplayPolicyForURL:^(NSURL *) {
         return _WKWebsiteAutoplayPolicyAllowWithoutSound;
     }];
@@ -225,14 +229,19 @@
     [webView loadRequest:requestWithoutAudio];
     [webView waitForMessage:@"autoplayed"];
 
+#if PLATFORM(MAC)
     [webView loadRequest:requestWithoutVolume];
     [webView waitForMessage:@"autoplayed"];
+#endif
 
     [delegate setAutoplayPolicyForURL:^(NSURL *) {
         return _WKWebsiteAutoplayPolicyDeny;
     }];
+
+#if PLATFORM(MAC)
     [webView loadRequest:requestWithoutVolume];
     [webView waitForMessage:@"did-not-play"];
+#endif
 
     [webView loadRequest:requestWithAudio];
     [webView waitForMessage:@"did-not-play"];
@@ -256,8 +265,10 @@
     [webView loadRequest:requestWithoutAudio];
     [webView waitForMessage:@"autoplayed"];
 
+#if PLATFORM(MAC)
     [webView loadRequest:requestWithoutVolume];
     [webView waitForMessage:@"autoplayed"];
+#endif
 
     NSURLRequest *requestWithAudioInIFrame = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-check-in-iframe" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to