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

Unified Diff: LayoutTests/media/video-canvas-draw-expected.html

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied last corrections Created 6 years, 9 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-canvas-draw-expected.html
diff --git a/LayoutTests/media/video-canvas-draw-expected.html b/LayoutTests/media/video-canvas-draw-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..0f9f14591c3b4ecdd3e0dd93df54d3a9e4dabfa8
--- /dev/null
+++ b/LayoutTests/media/video-canvas-draw-expected.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="media-file.js"></script>
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+}
+
+var videosLoaded = 0;
+
+function onVideoLoaded(e) {
+ videosLoaded = videosLoaded + 1;
+ if (window.testRunner && videosLoaded == 3) {
+ testRunner.notifyDone();
+ }
+}
+
+function onLoad() {
+ var video1 = document.getElementById('video1');
+ var video2 = document.getElementById('video2');
+ var video3 = document.getElementById('video3');
+ video1.src = findMediaFile("video", "content/test");
+ video2.src = video1.src;
+ video3.src = video1.src;
+
+ video1.load();
+ video2.load();
+ video3.load();
+ video1.addEventListener("canplay", onVideoLoaded);
+ video2.addEventListener("canplay", onVideoLoaded);
+ video3.addEventListener("canplay", onVideoLoaded);
+}
+
+</script>
+</head>
+<body onload="onLoad();">
+ Test to verify that drawing a video to a 2D canvas with drawImage and with a CanvasPattern works as expected.
+ <video id="video1"></video>
+ <video id="video2"></video>
+ <video id="video3"></video>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698