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

Unified Diff: content/browser/media/webrtc_getusermedia_browsertest.cc

Issue 635833002: Refactor WebRTC getUserMedia tests to be more explicit and clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarified TODO Created 6 years, 2 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 | « no previous file | content/test/data/media/getusermedia.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc_getusermedia_browsertest.cc
diff --git a/content/browser/media/webrtc_getusermedia_browsertest.cc b/content/browser/media/webrtc_getusermedia_browsertest.cc
index bbfddf52edb70a29e30639a500336dc177099277..ead80561bb742e640a4f88ee9b1bbf0b47f88433 100644
--- a/content/browser/media/webrtc_getusermedia_browsertest.cc
+++ b/content/browser/media/webrtc_getusermedia_browsertest.cc
@@ -126,15 +126,15 @@ class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest {
// Put getUserMedia to work and let it run for a couple of seconds.
DCHECK(time_to_sample_secs);
ExecuteJavascriptAndWaitForOk(
- base::StringPrintf("%s({video: true});",
+ base::StringPrintf("%s({video: true}, 'myStreamName');",
kGetUserMediaAndGetStreamUp));
// Now the stream is up and running, start collecting traces.
StartTracing();
- // Let the stream run for a while in javascript.
ExecuteJavascriptAndWaitForOk(
- base::StringPrintf("waitAndStopVideoTrack(%d);", time_to_sample_secs));
+ base::StringPrintf("waitAndStopVideoTrack(window['myStreamName'], %d);",
+ time_to_sample_secs));
// Wait until the page title changes to "OK". Do not sleep() here since that
// would stop both this code and the browser underneath.
« no previous file with comments | « no previous file | content/test/data/media/getusermedia.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698