Skip to content
Permalink
Browse files
Import media capture WPT tests
https://bugs.webkit.org/show_bug.cgi?id=178138

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-11
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/feature-policy/resources/feature-policy-payment.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-usb.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-webvr.html: Added.
* web-platform-tests/feature-policy/resources/featurepolicy.js: Added.
(test_feature_availability):
(expect_feature_available_default):
(expect_feature_unavailable_default):
(test_result):
(test_feature_availability_with_post_message_result):
(run_all_fp_tests_allow_self):
* web-platform-tests/feature-policy/resources/redirect-on-load.html: Added.
* web-platform-tests/feature-policy/resources/w3c-import.log: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https.html: Added.
* web-platform-tests/mediacapture-streams/OWNERS: Added.
* web-platform-tests/mediacapture-streams/historical-expected.txt: Added.
* web-platform-tests/mediacapture-streams/historical.html: Added.
* web-platform-tests/mediacapture-streams/w3c-import.log: Added.

LayoutTests:

Skipping tests for ports not supporting getUserMedia.

* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/194421@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Oct 11, 2017
1 parent 56011f3 commit 8ee4c7f89f69d7b6d46d04a1093a2a85297a9bce
Showing 74 changed files with 2,164 additions and 2 deletions.
@@ -1,3 +1,16 @@
2017-10-11 Youenn Fablet <youenn@apple.com>

Import media capture WPT tests
https://bugs.webkit.org/show_bug.cgi?id=178138

Reviewed by Eric Carlson.

Skipping tests for ports not supporting getUserMedia.

* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wpe/TestExpectations:

2017-10-11 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>

[GStreamer] Many media source tests crashing with GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion 'denom != 0' failed in gst_qtdemux_configure_stream()
@@ -1,3 +1,86 @@
2017-10-11 Youenn Fablet <youenn@apple.com>

Import media capture WPT tests
https://bugs.webkit.org/show_bug.cgi?id=178138

Reviewed by Eric Carlson.

* resources/import-expectations.json:
* web-platform-tests/feature-policy/resources/feature-policy-payment.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-usb.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-webvr.html: Added.
* web-platform-tests/feature-policy/resources/featurepolicy.js: Added.
(test_feature_availability):
(expect_feature_available_default):
(expect_feature_unavailable_default):
(test_result):
(test_feature_availability_with_post_message_result):
(run_all_fp_tests_allow_self):
* web-platform-tests/feature-policy/resources/redirect-on-load.html: Added.
* web-platform-tests/feature-policy/resources/w3c-import.log: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https.html: Added.
* web-platform-tests/mediacapture-streams/OWNERS: Added.
* web-platform-tests/mediacapture-streams/historical-expected.txt: Added.
* web-platform-tests/mediacapture-streams/historical.html: Added.
* web-platform-tests/mediacapture-streams/w3c-import.log: Added.

2017-10-10 Andy Estes <aestes@apple.com>

[Payment Request] Implement PaymentRequest.canMakePayment()
@@ -138,6 +138,7 @@
"web-platform-tests/eventsource": "import",
"web-platform-tests/ext-xhtml-pubid": "skip",
"web-platform-tests/feature-policy": "skip",
"web-platform-tests/feature-policy/resources": "import",
"web-platform-tests/fetch": "import",
"web-platform-tests/fullscreen": "skip",
"web-platform-tests/gamepad": "skip",
@@ -247,7 +248,7 @@
"web-platform-tests/media-capabilities": "skip",
"web-platform-tests/mediacapture-image": "skip",
"web-platform-tests/mediacapture-record": "skip",
"web-platform-tests/mediacapture-streams": "skip",
"web-platform-tests/mediacapture-streams": "import",
"web-platform-tests/mediasession": "skip",
"web-platform-tests/microdata": "skip",
"web-platform-tests/mixed-content": "skip",
@@ -276,6 +277,7 @@
"web-platform-tests/referrer-policy": "skip",
"web-platform-tests/remote-playback": "skip",
"web-platform-tests/resource-timing": "import",
"web-platform-tests/resources": "import",
"web-platform-tests/screen-orientation": "skip",
"web-platform-tests/scroll-anchoring": "skip",
"web-platform-tests/scroll-into-view": "skip",
@@ -328,4 +330,4 @@
"web-platform-tests/webvtt": "skip",
"web-platform-tests/workers": "skip",
"web-platform-tests/x-frame-options": "skip"
}
}
@@ -0,0 +1,16 @@
<script>
'use strict';

window.onload = function() {
var supportedInstruments = [ { supportedMethods: [ 'visa' ] } ];
var details = {
total: { label: 'Test', amount: { currency: 'USD', value: '5.00' } }
};
try {
new PaymentRequest(supportedInstruments, details);
parent.postMessage({ enabled: true }, '*');
} catch (e) {
parent.postMessage({ enabled: false }, '*');
}
}
</script>
@@ -0,0 +1,9 @@
<script>
'use strict';

Promise.resolve().then(() => navigator.usb.getDevices()).then(devices => {
window.parent.postMessage({ enabled: true }, '*');
}, error => {
window.parent.postMessage({ enabled: false }, '*');
});
</script>
@@ -0,0 +1,9 @@
<script>
'use strict';

Promise.resolve().then(() => navigator.getVRDisplays()).then(displays => {
window.parent.postMessage({ enabled: true }, '*');
}, error => {
window.parent.postMessage({ enabled: false }, '*');
});
</script>
@@ -0,0 +1,154 @@
// Tests whether a feature that is enabled/disabled by feature policy works
// as expected.
// Arguments:
// feature_description: a short string describing what feature is being
// tested. Examples: "usb.GetDevices()", "PaymentRequest()".
// test: test created by testharness. Examples: async_test, promise_test.
// src: URL where a feature's availability is checked. Examples:
// "/feature-policy/resources/feature-policy-payment.html",
// "/feature-policy/resources/feature-policy-usb.html".
// expect_feature_available: a callback(data, feature_description) to
// verify if a feature is avaiable or unavailable as expected.
// The file under the path "src" defines what "data" is sent back as a
// pistMessage. Inside the callback, some tests (e.g., EXPECT_EQ,
// EXPECT_TRUE, etc) are run accordingly to test a feature's
// availability.
// Example: expect_feature_available_default(data, feature_description).
// feature_name: Optional argument, only provided when testing iframe allow
// attribute. "feature_name" is the feature name of a policy controlled
// feature (https://wicg.github.io/feature-policy/#features).
// See examples at:
// https://github.com/WICG/feature-policy/blob/gh-pages/features.md
// allow_attribute: Optional argument, only used for testing fullscreen or
// payment: either "allowfullscreen" or "allowpaymentrequest" is passed.
function test_feature_availability(
feature_description, test, src, expect_feature_available, feature_name,
allow_attribute) {
let frame = document.createElement('iframe');
frame.src = src;

if (typeof feature_name !== 'undefined') {
frame.allow = frame.allow.concat(";" + feature_name);
}

if (typeof allow_attribute !== 'undefined') {
frame.setAttribute(allow_attribute, true);
}

window.addEventListener('message', test.step_func(function handler(evt) {
if (evt.source === frame.contentWindow) {
expect_feature_available(evt.data, feature_description);
document.body.removeChild(frame);
window.removeEventListener('message', handler);
test.done();
}
}));

document.body.appendChild(frame);
}

// Default helper functions to test a feature's availability:
function expect_feature_available_default(data, feature_description) {
assert_true(data.enabled, feature_description);
}

function expect_feature_unavailable_default(data, feature_description) {
assert_false(data.enabled, feature_description);
}

// This is the same as test_feature_availability() but instead of passing in a
// function to check the result of the message sent back from an iframe, instead
// just compares the result to an expected result passed in.
// Arguments:
// test: test created by testharness. Examples: async_test, promise_test.
// src: the URL to load in an iframe in which to test the feature.
// expected_result: the expected value to compare to the data passed back
// from the src page by postMessage.
// allow_attribute: Optional argument, only provided when an allow
// attribute should be specified on the iframe.
function test_feature_availability_with_post_message_result(
test, src, expected_result, allow_attribute) {
var test_result = function(data, feature_description) {
assert_equals(data, expected_result);
};
test_feature_availability(null, test, src, test_result, allow_attribute);
}

// This function runs all feature policy tests for a particular feature that
// has a default policy of "self". This includes testing:
// 1. Feature usage succeeds by default in the top level frame.
// 2. Feature usage succeeds by default in a same-origin iframe.
// 3. Feature usage fails by default in a cross-origin iframe.
// 4. Feature usage suceeds when an allow attribute is specified on a
// cross-origin iframe.
//
// The same page which called this function will be loaded in the iframe in
// order to test feature usage there. When this function is called in that
// context it will simply run the feature and return a result back via
// postMessage.
//
// Arguments:
// cross_origin: A cross-origin URL base to be used to load the page which
// called into this function.
// feature_name: The name of the feature as it should be specified in an
// allow attribute.
// error_name: If feature usage does not succeed, this is the string
// representation of the error that will be passed in the rejected
// promise.
// feature_promise_factory: A function which returns a promise which tests
// feature usage. If usage succeeds, the promise should resolve. If it
// fails, the promise should reject with an error that can be
// represented as a string.
function run_all_fp_tests_allow_self(
cross_origin, feature_name, error_name, feature_promise_factory) {
// This may be the version of the page loaded up in an iframe. If so, just
// post the result of running the feature promise back to the parent.
if (location.hash.startsWith('#iframe')) {
// This makes it possible to test multiple features in the one test file.
if (!location.hash.includes(feature_name))
return;
feature_promise_factory().then(
() => window.parent.postMessage('#OK', '*'),
(e) => window.parent.postMessage('#' + e.toString(), '*'));
return;
}

// Run the various tests.
// 1. Top level frame.
promise_test(
() => feature_promise_factory(),
'Default "' + feature_name +
'" feature policy ["self"] allows the top-level document.');

// 2. Same-origin iframe.
// Append #iframe to the URL so we can detect the iframe'd version of the
// page.
const same_origin_frame_pathname =
location.pathname + '#iframe#' + feature_name;
async_test(
t => {
test_feature_availability_with_post_message_result(
t, same_origin_frame_pathname, '#OK');
},
'Default "' + feature_name +
'" feature policy ["self"] allows same-origin iframes.');

// 3. Cross-origin iframe.
const cross_origin_frame_url = cross_origin + same_origin_frame_pathname;
async_test(
t => {
test_feature_availability_with_post_message_result(
t, cross_origin_frame_url, '#' + error_name);
},
'Default "' + feature_name +
'" feature policy ["self"] disallows cross-origin iframes.');

// 4. Cross-origin iframe with "allow" attribute.
async_test(
t => {
test_feature_availability_with_post_message_result(
t, cross_origin_frame_url, '#OK', feature_name);
},
'Feature policy "' + feature_name +
'" can be enabled in cross-origin iframes using "allow" attribute.');
}
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<body>
<script>
// Automatically redirects the page to a new URL on load.
// Load this document with a URL like:
// "feature-policy/resources/redirect-on-load.html#https://www.example.com/"
window.onload = function () {
document.location = document.location.hash.substring(1);
}
</script>
</body>
@@ -0,0 +1,21 @@
The tests in this directory were imported from the W3C repository.
Do NOT modify these tests directly in WebKit.
Instead, create a pull request on the WPT github:
https://github.com/w3c/web-platform-tests

Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport

Do NOT modify or remove this file.

------------------------------------------------------------------------
Properties requiring vendor prefixes:
None
Property values requiring vendor prefixes:
None
------------------------------------------------------------------------
List of files:
/LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-payment.html
/LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb.html
/LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-webvr.html
/LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/featurepolicy.js
/LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/redirect-on-load.html
@@ -0,0 +1,7 @@
Description

This test checks for the presence of the navigator.mediaDevices.getUserMedia method.


PASS mediaDevices.getUserMedia() is present on navigator

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<title>getUserMedia: test that getUserMedia is present</title>
<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
<meta name='assert' content='Check that the getUserMedia() method is present.'/>
</head>
<body>
<h1 class="instructions">Description</h1>
<p class="instructions">This test checks for the presence of the
<code>navigator.mediaDevices.getUserMedia</code> method.</p>
<div id='log'></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(function () {
assert_true(undefined !== navigator.mediaDevices && undefined !== navigator.mediaDevices.getUserMedia, "navigator.mediaDevices.getUserMedia exists");
}, "mediaDevices.getUserMedia() is present on navigator");
</script>
</body>
</html>

0 comments on commit 8ee4c7f

Please sign in to comment.