Bug 1439356 [wpt PR 9570] - Add support for video properties in MediaStreamTrack.getCapabilities(), a=testonly

Automatic update from web-platform-testsAdd support for video properties in MediaStreamTrack.getCapabilities()

Bug: 293292
Change-Id: Id190bc93a1fc42b6ad5c0d0a313dabc6fe348dce
Reviewed-on: https://chromium-review.googlesource.com/925203
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539021}

wpt-commits: cd2eda7fc55fd74fb66c5ae9a1fec7f39c4f06e5
wpt-pr: 9570
wpt-commits: cd2eda7fc55fd74fb66c5ae9a1fec7f39c4f06e5
wpt-pr: 9570
This commit is contained in:
Chandan Padhi 2018-03-26 13:05:04 +00:00 коммит произвёл James Graham
Родитель 4959654068
Коммит 2f9e7fe6f0
2 изменённых файлов: 17 добавлений и 5 удалений

Просмотреть файл

@ -570777,7 +570777,7 @@
"manual"
],
"mediacapture-streams/MediaStreamTrack-getCapabilities.https.html": [
"06662744434126b87eb1934504b53953419825cb",
"46cb0bc6251db37a40179d7938b0e1667c9fece4",
"testharness"
],
"mediacapture-streams/MediaStreamTrack-getSettings.https.html": [

Просмотреть файл

@ -1,8 +1,7 @@
<!doctype html>
<title>MediaStreamTrack GetCapabilities</title>
<p class="instructions">This test checks for the presence of
<code>echoCancellation</code> and <code>deviceId</code> fields
in <code>MediaStreamTrack.getCapabilities()</code> method.</p>
<p class="instructions">This test checks for the presence of audio and video properties in
<code>MediaStreamTrack.getCapabilities()</code> method.</p>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
@ -13,5 +12,18 @@ in <code>MediaStreamTrack.getCapabilities()</code> method.</p>
assert_true(undefined !== capabilities.deviceId, "MediaTrackCapabilities's deviceId should exist.");
assert_true(undefined !== capabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist.");
});
});
});
promise_test(() => {
return navigator.mediaDevices.getUserMedia({video: true})
.then(stream => {
var capabilities = stream.getVideoTracks()[0].getCapabilities();
assert_true(undefined !== capabilities.deviceId, "MediaTrackCapabilities's deviceId should exist.");
assert_true(undefined !== capabilities.width, "MediaTrackCapabilities's width should exist.");
assert_true(undefined !== capabilities.height, "MediaTrackCapabilities's height should exist.");
assert_true(undefined !== capabilities.aspectRatio, "MediaTrackCapabilities's aspectRatio should exist.");
assert_true(undefined !== capabilities.frameRate, "MediaTrackCapabilities's frameRate should exist.");
assert_true(undefined !== capabilities.facingMode, "MediaTrackCapabilities's facingMode should exist.");
});
});
</script>