[mac-wk2 debug] LayoutTest webrtc/video-mute.html is timing out
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 20:42:53 +0000 (20:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 20:42:53 +0000 (20:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169758

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-16
Reviewed by Eric Carlson.

Source/WebKit2:

Test is timing out due to the UIProcess requesting to disable/enable ICE candidate filtering
on a page whose preference is set to not enabling ICE candidate filtering.
Current fix is to act upon what UI process asks if the page preference is to enable ICE candidate filtering.
If ICE candidate filtering preference is disable for that page (WebKitTestRunner case), no disabling/enabling is done at all.

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::endedCaptureSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_backgroundCPULimit):
(WebKit::m_backgroundCPULimit):
(WebKit::WebPage::disableICECandidateFiltering):
(WebKit::WebPage::enableICECandidateFiltering):
* WebProcess/WebPage/WebPage.h:

LayoutTests:

* TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/UserMediaProcessManager.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h

index 2406789..3f29d25 100644 (file)
@@ -1,3 +1,12 @@
+2017-03-16  Youenn Fablet  <youenn@apple.com>
+
+        [mac-wk2 debug] LayoutTest webrtc/video-mute.html is timing out
+        https://bugs.webkit.org/show_bug.cgi?id=169758
+
+        Reviewed by Eric Carlson.
+
+        * TestExpectations:
+
 2017-03-16  Zalan Bujtas  <zalan@apple.com>
 
         Stay inside the continuation while searching for a candidate ancestor for insertion.
index b044c20..6f658bf 100644 (file)
@@ -711,9 +711,7 @@ media/session [ Skip ]
 # GTK enables some of these tests on their TestExpectations file.
 [ Release ] webrtc [ Skip ]
 
-[ Debug ] webrtc/peer-connection-audio-mute.html [ Pass Failure ]
 [ Debug ] webrtc/peer-connection-audio-mute2.html [ Pass Failure ]
-[ Debug ] webrtc/peer-connection-remote-audio-mute.html [ Pass Failure ]
 [ Debug ] webrtc/peer-connection-remote-audio-mute2.html [ Pass Failure ]
 fast/mediastream/getUserMedia-webaudio.html [ Skip ]
 fast/mediastream/RTCPeerConnection-AddRemoveStream.html [ Skip ]
index e58d764..7c92aaa 100644 (file)
@@ -1,3 +1,24 @@
+2017-03-16  Youenn Fablet  <youenn@apple.com>
+
+        [mac-wk2 debug] LayoutTest webrtc/video-mute.html is timing out
+        https://bugs.webkit.org/show_bug.cgi?id=169758
+
+        Reviewed by Eric Carlson.
+
+        Test is timing out due to the UIProcess requesting to disable/enable ICE candidate filtering
+        on a page whose preference is set to not enabling ICE candidate filtering.
+        Current fix is to act upon what UI process asks if the page preference is to enable ICE candidate filtering.
+        If ICE candidate filtering preference is disable for that page (WebKitTestRunner case), no disabling/enabling is done at all. 
+
+        * UIProcess/UserMediaProcessManager.cpp:
+        (WebKit::UserMediaProcessManager::endedCaptureSession):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_backgroundCPULimit):
+        (WebKit::m_backgroundCPULimit):
+        (WebKit::WebPage::disableICECandidateFiltering):
+        (WebKit::WebPage::enableICECandidateFiltering):
+        * WebProcess/WebPage/WebPage.h:
+
 2017-03-16  Alex Christensen  <achristensen@webkit.org>
 
         Clean up WKContentExtension API
index ac2222c..78456dd 100644 (file)
@@ -199,7 +199,8 @@ void UserMediaProcessManager::endedCaptureSession(UserMediaPermissionRequestMana
         return;
 
 #if ENABLE(WEB_RTC) && USE(LIBWEBRTC)
-    if (currentExtensions == ProcessState::SandboxExtensionsGranted::None && proxy.page().preferences().iceCandidateFilteringEnabled())
+    // FIXME: We should only do EnableICECandidateFiltering when the page is being reloaded.
+    if (currentExtensions == ProcessState::SandboxExtensionsGranted::None)
         proxy.page().process().send(Messages::WebPage::EnableICECandidateFiltering(), proxy.page().pageID());
 #endif
 
index 0e2afaf..6847b2e 100644 (file)
@@ -556,7 +556,9 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
 #endif
 
 #if ENABLE(WEB_RTC)
-    if (!parameters.iceCandidateFilteringEnabled)
+    m_shouldDoICECandidateFiltering = parameters.iceCandidateFilteringEnabled;
+
+    if (!m_shouldDoICECandidateFiltering)
         disableICECandidateFiltering();
 #if USE(LIBWEBRTC)
     if (parameters.enumeratingAllNetworkInterfacesEnabled)
@@ -568,6 +570,22 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
         registerURLSchemeHandler(iterator.value, iterator.key);
 }
 
+#if ENABLE(WEB_RTC)
+void WebPage::disableICECandidateFiltering()
+{
+    if (!m_shouldDoICECandidateFiltering)
+        return;
+    m_page->rtcController().disableICECandidateFiltering();
+}
+
+void WebPage::enableICECandidateFiltering()
+{
+    if (!m_shouldDoICECandidateFiltering)
+        return;
+    m_page->rtcController().disableICECandidateFiltering();
+}
+#endif
+
 void WebPage::reinitializeWebPage(WebPageCreationParameters&& parameters)
 {
     if (m_activityState != parameters.activityState)
index 50cf996..ce5d368 100644 (file)
@@ -1188,8 +1188,8 @@ private:
 #endif
 
 #if ENABLE(WEB_RTC)
-    void disableICECandidateFiltering() { m_page->rtcController().disableICECandidateFiltering(); }
-    void enableICECandidateFiltering() { m_page->rtcController().enableICECandidateFiltering(); }
+    void disableICECandidateFiltering();
+    void enableICECandidateFiltering();
 #if USE(LIBWEBRTC)
     void disableEnumeratingAllNetworkInterfaces() { m_page->libWebRTCProvider().disableEnumeratingAllNetworkInterfaces(); }
     void enableEnumeratingAllNetworkInterfaces() { m_page->libWebRTCProvider().enableEnumeratingAllNetworkInterfaces(); }
@@ -1549,6 +1549,10 @@ private:
     std::chrono::system_clock::time_point m_loadCommitTime;
 #endif
 
+#if ENABLE(WEB_RTC)
+    bool m_shouldDoICECandidateFiltering { true };
+#endif
+
     WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
 
     const String m_overrideContentSecurityPolicy;