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

Unified Diff: LayoutTests/media/video-capture-canvas.html

Issue 414543002: Delete mediaPlaybackRequiresUserGesture (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove extra header Created 6 years, 5 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: LayoutTests/media/video-capture-canvas.html
diff --git a/LayoutTests/media/video-capture-canvas.html b/LayoutTests/media/video-capture-canvas.html
deleted file mode 100644
index f11faf5d0fc01bca6eb5ff4011e5f65c7e3423cc..0000000000000000000000000000000000000000
--- a/LayoutTests/media/video-capture-canvas.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE HTML">
-<html>
-<head>
-<script src=media-file.js></script>
-<script src=video-test.js></script>
-<script src=video-played.js></script>
-<script src="../resources/js-test.js"></script>
-
-<script type="text/javascript">
-
-if (window.internals)
- window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
-
-function gotStream(stream)
-{
- consoleWrite("got a stream");
- previewURL = URL.createObjectURL(stream);
- video.src = previewURL;
- consoleWrite("start preview");
-}
-
-function gotStreamFailed(error)
-{
- consoleWrite("Failed to get access to local media. Error code was " + error.code);
-}
-
-function canplaythrough()
-{
- width = canvas.width;
- height = canvas.height;
- ctx = canvas.getContext("2d");
- ctx.fillStyle = 'black';
- ctx.fillRect(0, 0, width, height);
-
- consoleWrite("paint to canvas");
- ctx.drawImage(video, 0, 0, width, height);
- shouldBeTrue("!!ctx.getImageData(0, 0, width, height)");
-
- frame = ctx.getImageData(0, 0, width, height);
- r = frame.data[0];
- g = frame.data[1];
- b = frame.data[2];
- testExpected("r+g+b", 0, "!=");
- endTest();
-}
-
-function playPreview()
-{
- findMediaElement();
- canvas = document.getElementsByTagName('canvas')[0];
- try {
- consoleWrite("request access to local media");
- navigator.webkitGetUserMedia({video:true}, gotStream, gotStreamFailed);
- } catch (e) {
- consoleWrite("getUserMedia error " + "(" + e.name + " / " + e.message + ")");
- }
-
- waitForEvent('canplaythrough', canplaythrough);
-}
-
-</script>
-</head>
-
-<body onload="playPreview()">
-<video width="320" height="240" autoplay="autoplay"></video>
-<canvas width="1" height="1" ></canvas>
-</body>
-</html>
-

Powered by Google App Engine
This is Rietveld 408576698