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

Side by Side Diff: android_webview/tools/WebViewShell/test/blink-apis/webrtc/mediastream-callbacks.html

Issue 1785283005: [WebView] Reorganize all of the WebView Shell apks into their own dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <script src="../../resources/js-test.js"></script>
4 <body>
5 <script type="text/javascript">
6 description("Test MediaStream API callbacks in WebView");
7 window.jsTestIsAsync = true;
8
9 function error(e) {
10 testFailed('getUserMedia error callback, reason: ' + e.name);
11 finishJSTest();
12 }
13
14 function gotStream(stream) {
15 testPassed('getUserMedia succeeded.');
16 track = stream.getVideoTracks()[0];
17 activeStream = stream;
18 shouldBeEqualToString('track.readyState', 'live');
19 shouldBeTrue('activeStream.active');
20 finishJSTest();
21 }
22
23 function getUserMedia(constraints, callback) {
24 try {
25 navigator.webkitGetUserMedia(constraints, callback, error);
26 } catch (e) {
27 testFailed('webkitGetUserMedia threw exception :' + e);
28 finishJSTest();
29 }
30 }
31
32 getUserMedia({audio:true, video:true}, gotStream);
33 </script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698