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

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

Issue 653533004: Content browser test that checks gum callback is fired after failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | 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 8eb7d79748b1797e21898ddc4884394013d7339c..788b43f328d0a7f1d1f3d0d549b6a24dd94ba7f4 100644
--- a/content/browser/media/webrtc_getusermedia_browsertest.cc
+++ b/content/browser/media/webrtc_getusermedia_browsertest.cc
@@ -501,6 +501,36 @@ IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
ExecuteJavascriptAndReturnResult(call));
}
+// This test will make two getUserMedia requests, first one triggers error
phoglund_chromium 2014/10/15 18:03:09 Nit: phrase better; what about "This test makes tw
jansson 2014/10/16 07:08:33 Done.
+// callback while the 2nd one triggers success callback. Goal is to check that
+// callbacks are still fired after an error callback has fired.
+IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
+ TwoGetUserMediaAndCheckCallbackAfterFailure) {
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+
+ GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
+ NavigateToURL(shell(), url);
+
+ int large_value = 99999;
+ std::string constraints1 =
no longer working on chromium 2014/10/15 14:31:54 nit const std::string
phoglund_chromium 2014/10/15 18:03:09 Nit: Calling it constraints1|2 is misleading, sinc
jansson 2014/10/16 07:08:33 Done.
jansson 2014/10/16 07:08:33 Done.
+ GenerateGetUserMediaCall(kGetUserMediaAndExpectFailure,
+ large_value,
+ large_value,
+ large_value,
+ large_value,
+ large_value,
+ large_value);
+ std::string constraints2 =
no longer working on chromium 2014/10/15 14:31:54 ditto
jansson 2014/10/16 07:08:33 Done.
+ GenerateGetUserMediaCall(kGetUserMediaAndAnalyseAndStop,
+ 640, 640, 480, 480, 10, 30);
+
+ ASSERT_EQ("ConstraintNotSatisfiedError",
+ ExecuteJavascriptAndReturnResult(constraints1));
+
+ ASSERT_EQ("w=640:h=480",
+ ExecuteJavascriptAndReturnResult(constraints2));
+}
+
// This test will make a simple getUserMedia page, verify that video is playing
// in a simple local <video>, and for a couple of seconds, collect some
// performance traces from VideoCaptureController colorspace conversion and
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698