Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: chrome/test/data/extensions/api_test/tab_capture/performance.js

Issue 1076533002: Fix some shutdown problems in tab capture performance tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix fps Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/tab_capture/performance.js
diff --git a/chrome/test/data/extensions/api_test/tab_capture/performance.js b/chrome/test/data/extensions/api_test/tab_capture/performance.js
index 7f315e213b5176265054886ec36ae2d954c287cc..bfb0c15eb7bf1cf24a06045505970a0fa046542a 100644
--- a/chrome/test/data/extensions/api_test/tab_capture/performance.js
+++ b/chrome/test/data/extensions/api_test/tab_capture/performance.js
@@ -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);
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698