Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.html

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.html b/third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.html
deleted file mode 100644
index fef3f4f3b09a3580fe35e6632d1996eb7b718c42..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>A disabled video track is rendered as blackness</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#introduction">
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastreams-as-media-elements">
-</head>
-<body>
-<p class="instructions">When prompted, accept to share your video stream.</p>
-<h1 class="instructions">Description</h1>
-<p class="instructions">This test checks that a disabled video track in a
-MediaStream is rendered as blackness.</p>
-<video id="vid"></video>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src="/common/vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]' data-prefixed-prototypes='[{"ancestors":["HTMLMediaElement"],"name":"srcObject"}]'></script>
-<script>
-var vid = document.getElementById("vid");
-var cv = document.createElement("canvas");
-var t = async_test("Tests that a disabled video track in a MediaStream is rendered as blackness", {timeout: 10000});
-t.step(function() {
- navigator.getUserMedia(
- {video: true},
- t.step_func(function (stream) {
- var testOncePlaying = function() {
- if (stream.getVideoTracks()[0].enabled) {
- stream.getVideoTracks()[0].enabled = false;
- return;
- }
-
- vid.removeEventListener("timeupdate", testOncePlaying, false);
- cv.width = vid.offsetWidth;
- cv.height = vid.offsetHeight;
- var ctx = cv.getContext("2d");
- ctx.drawImage(vid,0,0);
- var imageData = ctx.getImageData(0, 0, cv.width, cv.height);
- for (var i = 0; i < imageData.data.length; i+=4) {
- assert_equals(imageData.data[i], 0, "No red component in pixel #" + i);
- assert_equals(imageData.data[i + 1], 0, "No green component in pixel #" + i);
- assert_equals(imageData.data[i + 2], 0, "No blue component in pixel #" + i);
- assert_equals(imageData.data[i + 3], 255, "No transparency in pixel #" + i);
- }
- t.done();
- }
- vid.srcObject = stream;
- vid.play();
- vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false);
- }),
- function(error) {});
-});
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698