Commit 518e065e authored by Miguel Casas-Sanchez's avatar Miguel Casas-Sanchez Committed by Commit Bot

Capture from HTMLMediaElement: remove duplicated layouttests


This CL removes the LayoutTests from fast/mediacapturefromelement
that are duplicated after the GitHub PR [1] got rolled in.

N.B.: This CL is complemented by the PR [2] that cleans up a bit 
the path of the webm files in external/wpt/mediacapture-fromelement 
(but these two are orthogonal and should not interact).

[1] https://github.com/w3c/web-platform-tests/pull/6559
[2] https://github.com/w3c/web-platform-tests/pull/6588

** No new code, just shuffling things around **

Bug: 619625
Change-Id: Ie3540a57f03ed8ab34f048fa309d5ce1525b7f61
Reviewed-on: https://chromium-review.googlesource.com/576595Reviewed-by: default avatarJeff Carpenter <jeffcarp@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488525}
parent d24dbd55
......@@ -441,7 +441,7 @@ Bug(none) external/wpt/workers/constructors/Worker/Blob-url.html [ Failure Timeo
Bug(none) external/wpt/workers/name-property.html [ Failure Timeout ]
Bug(none) fast/canvas/canvas-createImageBitmap-drawImage.html [ Crash Failure ]
Bug(none) fast/canvas/webgl/texImage-imageBitmap-from-imageBitmap-from-blob.html [ Crash Failure ]
Bug(none) fast/canvas/canvas-createImageBitmap-invalid-blob-in-workers.html [ Crash ]
Bug(none) fast/canvas/canvas-createImageBitmap-invalid-blob-in-workers.html [ Crash ]
Bug(none) fast/canvas/webgl/texImage-imageBitmap-from-blob.html [ Crash Failure ]
Bug(none) fast/canvas/canvas-createImageBitmap-resize.html [ Crash Failure ]
Bug(none) fast/canvas/canvas-createImageBitmap-immutable.html [ Crash Timeout ]
......@@ -560,9 +560,6 @@ Bug(none) fast/loader/simultaneous-reloads-assert.html [ Failure ]
Bug(none) fast/loader/stateobjects/pushstate-in-data-url-denied.html [ Failure ]
Bug(none) fast/loader/url-strip-cr-lf-tab.html [ Failure ]
Bug(none) fast/media/mq-color-gamut-picture.html [ Failure ]
Bug(none) fast/mediacapturefromelement/HTMLMediaElementCapture-capture.html [ Timeout ]
Bug(none) fast/mediacapturefromelement/HTMLMediaElementCapture-creation.html [ Timeout ]
Bug(none) fast/mediacapturefromelement/HTMLMediaElementCapture-ended.html [ Timeout ]
Bug(none) fast/mediarecorder/BlobEvent-basic.html [ Failure ]
Bug(none) fast/mediastream/MediaStreamTrack-clone.html [ Timeout ]
Bug(none) fast/mediastream/MediaStreamTrack-contentHint.html [ Timeout ]
......
<!DOCTYPE html>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script>
// Run captureStream() on different videos, and assert data is flowing.
var makeAsyncTest = function(filename) {
async_test(function(test) {
var video = document.createElement('video');
video.src = "../../http/tests/media/resources/media-source/webm/" + filename;
video.onerror = this.unreached_func("<video> error");
video.play();
var stream = video.captureStream();
// onactive event is marked for deprecation (https://crbug.com/649328)
stream.onactive = this.step_func_done(function() {
var recorder = new MediaRecorder(stream);
recorder.ondataavailable = test.step_func_done(function(event) {
assert_true(event.data.size > 0, 'Recorded data size should be > 0');
});
recorder.start(0);
});
}), "<video>.captureStream() and assert data flows.";
};
generate_tests(makeAsyncTest, [
[ "video-only", "test-v-128k-320x240-24fps-8kfr.webm" ],
[ "audio-only", "test-a-128k-44100Hz-1ch.webm" ],
[ "video+audio", "test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm" ]
]);
</script>
<!DOCTYPE html>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script>
// Run captureStream() on <video>/<audio>s and inspect the generated Stream.
var makeAsyncTest = function(filename, numTracks) {
async_test(function() {
var video = document.createElement('video');
video.src = "../../http/tests/media/resources/media-source/webm/" + filename;
video.onerror = this.unreached_func("<video> error");
video.play();
var stream = video.captureStream();
assert_not_equals(stream, null, "error generating stream");
// onactive event is marked for deprecation (https://crbug.com/649328)
stream.onactive = this.step_func_done(function() {
// The stream got a (number of) MediaStreamTracks added.
assert_equals(stream.getVideoTracks().length, numTracks['vid'], 'video');
assert_equals(stream.getAudioTracks().length, numTracks['aud'], 'audio');
});
}), "<video>.captureStream()";
};
generate_tests(makeAsyncTest, [
[ "video-only", "test-v-128k-320x240-24fps-8kfr.webm", {vid : 1, aud : 0} ],
[ "audio-only", "test-a-128k-44100Hz-1ch.webm", {vid : 0, aud : 1} ],
[ "video+audio", "test.webm", {vid : 1, aud : 1} ]
]);
</script>
<!DOCTYPE html>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script>
// Run captureStream() on different videos, and assert the mediastream is
// ended when the source HTMLMediaElement finishes
var makeAsyncTest = function(filename) {
async_test(function(test) {
var video = document.createElement('video');
video.src = "../../http/tests/media/resources/media-source/webm/" + filename;
video.onerror = this.unreached_func("<video> error");
video.play();
var stream = video.captureStream();
stream.onremovetrack = this.step_func_done(function() {
assert_true(video.ended, 'video must be ended');
assert_equals(stream.getTracks().length, 0, 'stream must have no tracks');
assert_false(stream.active, 'stream must be inactive');
});
}), "<video>.captureStream() and assert data flows.";
};
generate_tests(makeAsyncTest, [
[ "video-only", "test-v-128k-320x240-24fps-8kfr.webm" ],
[ "audio-only", "test-a-128k-44100Hz-1ch.webm" ],
[ "video+audio", "test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm" ]
]);
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment