chromium/android_webview/tools/system_webview_shell/test/data/blink-apis/webrtc/mediastream-callbacks.html

<!DOCTYPE html>
<html>
  <script src="../../resources/js-test.js"></script>
  <body>
    <script type="text/javascript">
      description("Test MediaStream API callbacks in WebView");
      window.jsTestIsAsync = true;

      function error(e) {
        testFailed('getUserMedia error callback, reason: ' + e.name);
        finishJSTest();
      }

      function gotStream(stream) {
        testPassed('getUserMedia succeeded.');
        track = stream.getVideoTracks()[0];
        activeStream = stream;
        shouldBeEqualToString('track.readyState', 'live');
        shouldBeTrue('activeStream.active');
        finishJSTest();
      }

      function getUserMedia(constraints, callback) {
        try {
          navigator.webkitGetUserMedia(constraints, callback, error);
        } catch (e) {
          testFailed('webkitGetUserMedia threw exception :' + e);
          finishJSTest();
        }
      }

      getUserMedia({audio:true, video:true}, gotStream);
    </script>
  </body>
</html>