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

Unified Diff: content/test/data/media/getusermedia-real-webcam.html

Issue 663793003: Relanding WebRTC real webcam browsertest for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « content/content_tests.gypi ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/getusermedia-real-webcam.html
diff --git a/content/test/data/media/getusermedia-real-webcam.html b/content/test/data/media/getusermedia-real-webcam.html
new file mode 100644
index 0000000000000000000000000000000000000000..8215c0f82a93ff83ef6bfc7d083309fc2df2a425
--- /dev/null
+++ b/content/test/data/media/getusermedia-real-webcam.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+ <script type="text/javascript" src="webrtc_test_utilities.js"></script>
+ <script type="text/javascript">
+ $ = function(id) {
+ return document.getElementById(id);
+ };
+
+ function getUserMediaAndReturnVideoDimensions(constraints) {
+ navigator.webkitGetUserMedia(
+ constraints, gotStreamCallback, failedCallback);
+ }
+
+ function failedCallback(error) {
+ failTest('GetUserMedia call failed with code ' + error.code);
+ }
+
+ function gotStreamCallback(stream) {
+ var localView = $('local-view');
+ localView.src = URL.createObjectURL(stream);
+ detectVideoPlaying('local-view', function() {
+ sendValueToTest(localView.videoWidth + 'x' + localView.videoHeight);
+ });
+ }
+ </script>
+</head>
+<body>
+ <table border="0">
+ <tr>
+ <td><video id="local-view" autoplay="autoplay">
+ </video></td>
+ <td><canvas id="local-view-canvas" style="display:none"></canvas></td>
+ </tr>
+ </table>
+</body>
+</html>
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698