Commit d3cb1ab4 authored by Sergey Silkin's avatar Sergey Silkin Committed by Commit Bot

Reland "Update and enable CanSetupH264VideoCallOnSupportedDevice."

This reverts commit 8a6b0ccd.

Reason for revert: Update the test but keep it disabled until https://bugs.chromium.org/p/chromium/issues/detail?id=1047994 is fixed.

Original change's description:
> Revert "Update and enable CanSetupH264VideoCallOnSupportedDevice."
>
> This reverts commit 0fce13aa.
>
> Reason for revert: It broke the chromium.webrtc bot (example: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20(dbg)%20(K%20Nexus5)/5712)
>
> Original change's description:
> > Update and enable CanSetupH264VideoCallOnSupportedDevice.
> >
> > - Ensure that call actually uses H264 by checking codec type in
> > video track stats.
> >
> > - Enable CanSetupH264VideoCallOnSupportedDevice test.
> >
> > Bug: webrtc:11244, 1047994
> > Change-Id: I5ba241828500de9e465d5200e651640394d2ce6a
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033511
> > Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> > Reviewed-by: Harald Alvestrand <hta@chromium.org>
> > Commit-Queue: Sergey Silkin <ssilkin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#742572}
>
> TBR=hta@chromium.org,mcasas@chromium.org,guidou@chromium.org,ssilkin@chromium.org
>
> Change-Id: I4ea3badad7ed564801a458263eb6366991f2924c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11244, 1047994
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063135
> Reviewed-by: Armando Miraglia <armax@chromium.org>
> Commit-Queue: Armando Miraglia <armax@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#742621}

TBR=hta@chromium.org,mcasas@chromium.org,guidou@chromium.org,armax@chromium.org,ssilkin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11244, 1047994
Change-Id: I1b6d5c02f5b7230d8834d042d2605022f1fd8758
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075617Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Sergey Silkin <ssilkin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746272}
parent c389f9ce
......@@ -255,6 +255,8 @@ IN_PROC_BROWSER_TEST_F(
#if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS)
// This test is to make sure HW H264 work normally on supported devices, since
// there is no SW H264 fallback available on Android.
// TODO(crbug.com/1047994): Disabled due to flakiness caused by timing issue
// in blink HW codec factories.
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
DISABLED_CanSetupH264VideoCallOnSupportedDevice) {
MakeTypicalPeerConnectionCall("CanSetupH264VideoCallOnSupportedDevice();");
......
......@@ -756,17 +756,36 @@
reportTestSuccess();
}
function CanSetupH264VideoCallOnSupportedDevice() {
async function CanSetupH264VideoCallOnSupportedDevice() {
createConnections(null);
setOfferSdpTransform(maybePreferH264SendCodec);
navigator.mediaDevices.getUserMedia({audio: true, video: true})
navigator.mediaDevices.getUserMedia({audio: false, video: true})
.then(addStreamToBothConnectionsAndNegotiate)
.catch(failTest);
Promise.all([
detectVideoPlaying('remote-view-1'),
detectVideoPlaying('remote-view-1')
]).then(reportTestSuccess);
await detectVideoPlaying('remote-view-1');
await detectVideoPlaying('remote-view-2');
assertEquals(gLocalStream.getVideoTracks().length, 1);
// Ensure that call uses H264.
gFirstConnection.getStats(gLocalStream.getVideoTracks()[0])
.then(function(report) {
var numCodecs = 0;
var hasH264 = false;
report.forEach(stats => {
if (stats.type == 'codec') {
numCodecs++;
if (stats.mimeType == 'video/H264') {
hasH264 = true;
}
}
});
assertEquals(1, numCodecs);
assertTrue(hasH264);
reportTestSuccess();
})
.catch(failTest);
}
</script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment