Modify testrunner to mute audio during tests
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 20:10:40 +0000 (20:10 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Oct 2016 20:10:40 +0000 (20:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162582

Reviewed by Alexey Proskuryakov.

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp

index ef45956..7c20aeb 100644 (file)
@@ -1,3 +1,15 @@
+2016-10-19  Jer Noble  <jer.noble@apple.com>
+
+        Modify testrunner to mute audio during tests
+        https://bugs.webkit.org/show_bug.cgi?id=162582
+
+        Reviewed by Alexey Proskuryakov.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (createWebViewAndOffscreenWindow):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetStateToConsistentValues):
+
 2016-10-19  Joseph Pecoraro  <pecoraro@apple.com>
 
         check-webkit-style: fix false-positive warnings about using #pragma once header guard
index 745f270..0951e4d 100644 (file)
@@ -854,6 +854,8 @@ WebView *createWebViewAndOffscreenWindow()
     }
 #endif
 
+    [webView setMediaVolume:0];
+
     return webView;
 }
 
index 575eeb4..803ccc0 100644 (file)
@@ -753,6 +753,8 @@ bool TestController::resetStateToConsistentValues(const TestOptions& options)
     m_mainWebView->setWindowFrame(WKRectMake(rect.origin.x, rect.origin.y, TestController::viewWidth, TestController::viewHeight));
 #endif
 
+    WKPageSetMuted(m_mainWebView->page(), true);
+
     // Reset notification permissions
     m_webNotificationProvider.reset();