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

Unified Diff: chrome/test/data/webrtc/getusermedia.js

Issue 10696115: Add test to verify we can cancel the GetUserMedia request right after sending the request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | chrome/test/functional/webrtc_call.py » ('j') | chrome/test/functional/webrtc_call.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webrtc/getusermedia.js
diff --git a/chrome/test/data/webrtc/getusermedia.js b/chrome/test/data/webrtc/getusermedia.js
index bdfd28ce38400e56e06cd5ee05e1a6041f0eb384..1f5baaf4a94104761f925fa126cc46a6e74990dc 100644
--- a/chrome/test/data/webrtc/getusermedia.js
+++ b/chrome/test/data/webrtc/getusermedia.js
@@ -37,6 +37,16 @@ function getUserMedia(requestVideo, requestAudio) {
}
/**
+ * This function cancel the GetUserMedia request by reloading the web page.
+ */
phoglund_chromium 2012/07/04 14:20:58 I think it makes more sense to call this guy Reloa
no longer working on chromium 2012/07/05 14:05:19 Done.
+function CancelGetUserMediaRequest() {
+ location.reload();
+
phoglund_chromium 2012/07/04 14:20:58 Reloading page
no longer working on chromium 2012/07/05 14:05:19 Done.
+ debug("Cancelling GetUserMedia request.");
phoglund_chromium 2012/07/04 14:20:58 ok-reloaded-page
no longer working on chromium 2012/07/05 14:05:19 Done.
+ returnToPyAuto('ok-calceled-request');
+}
+
+/**
* Must be called after calling getUserMedia. Returns not-called-yet if we have
* not yet been called back by WebRTC. Otherwise it returns either ok-got-stream
* or failed-with-error-x (where x is the error code from the error callback)
@@ -73,4 +83,4 @@ function getUserMediaOkCallback(stream) {
function getUserMediaFailedCallback(error) {
gRequestWebcamAndMicrophoneResult = 'failed-with-error-' + error.code;
phoglund_chromium 2012/07/04 14:20:58 Not sure what happened on this line?
no longer working on chromium 2012/07/05 14:05:19 Not sure, it does not change anything in my editor
-}
+}
« no previous file with comments | « no previous file | chrome/test/functional/webrtc_call.py » ('j') | chrome/test/functional/webrtc_call.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698