1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
3 Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
5 Use of this source code is governed by a BSD-style license
6 that can be found in the LICENSE file in the root of the source
7 tree. An additional intellectual property rights grant can be found
8 in the file PATENTS. All contributing project authors may
9 be found in the AUTHORS file in the root of the source tree.
13 <title>getUserMedia Browser Conformance Test</title>
14 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
15 <meta charset="utf-8">
19 To quickly iterate when developing this test, make sure you select
20 'Always allow this site to use this webcam' option in the dropdown menu of
21 Chrome when it's requesting access to your webcam.
22 Notice that this requires the site you're browsing to use HTTPS.
26 <h1>Conformance test for the Media Capture and Streams API</h1>
27 <p>This page contains a foundation of conformance tests that can be expanded
28 to cover most things in the W3C specification of the Media Capture and Streams
30 <p>VERSION: These tests are based on the W3C Editor's Draft of 07 May,
32 (<a href="http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html</a>)
33 <p>STATUS: In its current state, it only performs simple checks on the various
34 attributes and methods of the objects exposed by the API. There's not much
35 functionality tested so far. The spec doesn't define if an attribute shall be
36 owned by the object itself (<code>assert_own_propety</code>) or if it shall be
37 inherited (<code>assert_inherits</code>). Since testharness.js doesn't offer
38 any generic function that covers both, the method for verification is
39 currently chosen according to the current Chrome implementation.</p>
40 <p>HOW TO RUN: For Chrome, do this:
42 <li>Provide a fake webcam (<code>--use-fake-ui-for-media-stream</code> in
44 <li>Automatically allow access to the webcam
45 (<code>--use-fake-device-for-media-stream</code> in Chrome)</li>
46 <li>Allow loading HTML files from disk
47 (<code>--allow-file-access-from-files</code> in Chrome)</li>
49 Then just load this HTML file to execute the tests.</p>
50 <p>For Firefox, set the media.navigator.permission.disabled property to true
51 about:config. You must have a webcam and microphone available on the system.
55 <!-- These files are in place when executing on W3C. -->
56 <script src="/resources/testharness.js"></script>
57 <script src="/resources/testharnessreport.js"></script>
58 <script src="/common/vendor-prefix.js"
59 data-prefixed-objects=
60 '[{"ancestors":["navigator"], "name":"getUserMedia"},
61 {"ancestors":["window"], "name":"RTCPeerConnection"}]'
62 data-prefixed-prototypes=
63 '[{"ancestors":["HTMLMediaElement"],"name":"srcObject"}]'>
66 <script src="getusermedia_conformance_test.js"></script>