Commit f8c05106 authored by hubbe's avatar hubbe Committed by Commit bot

Fix some shutdown problems in tab capture performance tests.

As usual, the RunUntilIdle() call causes problems. Calling stop() on the
webrtc stream apparently doesn't propagate back to the capture, so make sure
that we call stop() on the capture stream explicitly.

Also, raise frame rate to 60 fps.

Not entirely sure if this will fix the attached bug or not, but either way it's a problem that should be fixed.

BUG=474808

Review URL: https://codereview.chromium.org/1076533002

Cr-Commit-Position: refs/heads/master@{#324325}
parent b2013c3f
......@@ -187,7 +187,7 @@ class TabCapturePerformanceTest
// Ideally we'd like to run a higher capture rate when vsync is disabled,
// but libjingle currently doesn't allow that.
// page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30";
page += "&fps=30";
page += "&fps=60";
ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_;
ASSERT_TRUE(tracing::EndTracing(&json_events));
scoped_ptr<trace_analyzer::TraceAnalyzer> analyzer;
......
......@@ -10,6 +10,7 @@
// Global to prevent gc from eating the video tag.
var video = null;
var capture_stream = null;
function TestStream(stream) {
// Create video and canvas elements, but no need to append them to the
......@@ -38,6 +39,9 @@ function TestStream(stream) {
// Note that the API testing framework might not terminate if we keep
// animating and capturing, so we have to make sure that we stop doing
// that here.
if (capture_stream) {
capture_stream.stop();
}
stream.stop();
return;
}
......@@ -64,6 +68,7 @@ function TestStream(stream) {
// Set up a WebRTC connection and pipe |stream| through it.
function testThroughWebRTC(stream) {
capture_stream = stream;
console.log("Testing through webrtc.");
var sender = new webkitRTCPeerConnection(null);
var receiver = new webkitRTCPeerConnection(null);
......
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