haikuwebkit/LayoutTests/fast/canvas/canvas-createPattern-video-...

22 lines
629 B
Plaintext
Raw Permalink Normal View History

Support createPattern(HTMLVideoElement, const String& repetitionType) https://bugs.webkit.org/show_bug.cgi?id=149984 <rdar://problem/23058823> Patch by George Ruan <gruan@apple.com> on 2016-06-06 Reviewed by Dean Jackson. Source/WebCore: Support functionality for HTMLVideoElement argument for CanvasRenderingContext2D::createPattern*() Tests: fast/canvas/canvas-createPattern-video-invalid.html fast/canvas/canvas-createPattern-video-loading.html fast/canvas/canvas-createPattern-video-modify.html http/tests/security/canvas-remote-read-remote-video-allowed-anonymous.html http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html http/tests/security/canvas-remote-read-remote-video-localhost.html http/tests/security/canvas-remote-read-remote-video-redirect.html media/video-canvas-createPattern.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): Implement functionality of description * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: LayoutTests: * fast/canvas/canvas-createPattern-video-invalid-expected.txt: Added. * fast/canvas/canvas-createPattern-video-invalid.html: Added. Test behavior when given invalid arguments. * fast/canvas/canvas-createPattern-video-loading-expected.txt: Added. * fast/canvas/canvas-createPattern-video-loading.html: Added. Tests behavior before video loaded, right after it's loaded, and after being played. * fast/canvas/canvas-createPattern-video-modify-expected.txt: Added. * fast/canvas/canvas-createPattern-video-modify.html: Added. Tests that modifying the video after calling the createPattern() function does not affect the pattern rendered or to be rendered. * http/tests/security/canvas-remote-read-remote-image-allowed-expected.txt: Fix typo. * http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials-expected.txt: Fix typo. * http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html: Fix typo. * http/tests/security/canvas-remote-read-remote-image-allowed.html: Fix typo. * http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin-expected.txt: Fix typo. * http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html: Fix typo. * http/tests/security/canvas-remote-read-remote-video-allowed-anonymous-expected.txt: Added. * http/tests/security/canvas-remote-read-remote-video-allowed-anonymous.html: Added. This test will fail as CORS is not implemented for media yet. Tests that data can be retrieved from canvas even when tainted if CORS is enabled with anonymous. * http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials-expected.txt: Added. * http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html: Added. This test will fail as CORS is not implemented for media yet. Tests that data can be retrieved from canvas even when tainted if CORS is enabled with credentials. * http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin-expected.txt: Added. * http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html: Added. Ensures that data cannot be retrieved from a tainted canvas if no cross origin is enabled. * http/tests/security/canvas-remote-read-remote-video-localhost-expected.txt: Added. * http/tests/security/canvas-remote-read-remote-video-localhost.html: Added. Ensures that localhost is blocked like http. * http/tests/security/canvas-remote-read-remote-video-redirect-expected.txt: Added. * http/tests/security/canvas-remote-read-remote-video-redirect.html: Added. Ensures that redirects are blocked. * http/tests/security/resources/canvas-video-crossorigin.js: Added. Includes common functions used to test the CORS of canvas for video. * http/tests/security/resources/video-cross-origin-allow-credentials.php: Added. Script that serves test video for canvas-remote-read-remote-video-allowed-with-credentials.html. * media/video-canvas-createPattern-expected.txt: Added. * media/video-canvas-createPattern.html: Added. Naive test that ensures functionality of createPattern() with HTMLVideoElement argument. * platform/ios-simulator-wk1/TestExpectations: Added canvas-remote-read-remote-video-allowed-anonymous.html and canvas-remote-read-remote-video-allowed-with-credentials.html. * platform/ios-simulator-wk2/TestExpectations: Same as wk1. * platform/mac/TestExpectations: Same as wk1. * platform/mac/media/video-canvas-createPattern-expected.png: Added. * platform/win/TestExpectations: Same as wk1. * platform/wk2/TestExpectations: Same as wk1. Canonical link: https://commits.webkit.org/176510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-06 20:30:05 +00:00
Tests that modifying the video used in createPattern does not affect the pattern rendered.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS buffer[0] is within 2 of 194
PASS buffer[1] is within 2 of 193
PASS buffer[2] is within 2 of 14
PASS buffer[0] is within 2 of 194
PASS buffer[1] is within 2 of 193
PASS buffer[2] is within 2 of 14
PASS buffer[0] is within 2 of 194
PASS buffer[1] is within 2 of 193
PASS buffer[2] is within 2 of 14
PASS buffer[0] is within 2 of 194
PASS buffer[1] is within 2 of 193
PASS buffer[2] is within 2 of 14
PASS successfullyParsed is true
TEST COMPLETE