WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for EWS
bug-231645-20211023122239.patch (text/plain), 3.58 KB, created by
Cameron McCormack (:heycam)
on 2021-10-22 18:22:41 PDT
(
hide
)
Description:
Patch for EWS
Filename:
MIME Type:
Creator:
Cameron McCormack (:heycam)
Created:
2021-10-22 18:22:41 PDT
Size:
3.58 KB
patch
obsolete
>Subversion Revision: 284730 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7ceb81ec9df48991c04175d21d68e565435faabb..63ddd81386da00d3fc8d558336a739a5341e7f95 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2021-10-12 Cameron McCormack <heycam@apple.com> >+ >+ Test that colors in a canvas.captureStream() video track are preserved when sent over a peer connection >+ https://bugs.webkit.org/show_bug.cgi?id=231645 >+ <rdar://problem/84172363> >+ >+ Reviewed by Youenn Fablet. >+ >+ * webrtc/captureStream-color-space-expected.txt: Added. >+ * webrtc/captureStream-color-space.html: Added. >+ > 2021-10-22 Cameron McCormack <heycam@apple.com> > > Update WPT test tolerance and mark some failures as simulator-only >diff --git a/LayoutTests/webrtc/captureStream-color-space-expected.txt b/LayoutTests/webrtc/captureStream-color-space-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7469fe092c88811500c3ccc4d8811ac703aaf26c >--- /dev/null >+++ b/LayoutTests/webrtc/captureStream-color-space-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS Test that colors in a canvas.captureStream() video track are preserved when sent over a peer connection >+ >diff --git a/LayoutTests/webrtc/captureStream-color-space.html b/LayoutTests/webrtc/captureStream-color-space.html >new file mode 100644 >index 0000000000000000000000000000000000000000..725f717dfdcf7e6be545b00f82d11fe43816a5fe >--- /dev/null >+++ b/LayoutTests/webrtc/captureStream-color-space.html >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<title>Test that colors in a canvas.captureStream() video track are preserved when sent over a peer connection</title> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<canvas id="src" width="16" height="16"></canvas> >+<video id="vid" width="16" height="16" autoplay></video> >+<canvas id="dst" width="16" height="16"></canvas> >+<script> >+function drawSourceThenCheckDestination() { >+ const srcContext = src.getContext("2d"); >+ srcContext.fillStyle = "#800000"; >+ srcContext.fillRect(0, 0, 16, 16); >+ >+ const dstContext = dst.getContext("2d"); >+ dstContext.clearRect(0, 0, 16, 16); >+ dstContext.drawImage(vid, 0, 0); >+ >+ // The stream takes a few frames to get started. Wait until the drawImage() call paints something. >+ const imageData = dstContext.getImageData(0, 0, 1, 1); >+ if (!imageData.data[3]) { >+ requestAnimationFrame(t.step_func(drawSourceThenCheckDestination)); >+ return; >+ } >+ >+ const actual = [...imageData.data]; >+ const expected = [128, 0, 0, 255]; >+ assert_array_approx_equals(actual, expected, 2, `actual = ${actual}, expected = ${expected}`); >+ t.done(); >+} >+ >+var t = async_test(async function(t) { >+ requestAnimationFrame(t.step_func(drawSourceThenCheckDestination)); >+ >+ const connectionA = new RTCPeerConnection(); >+ const connectionB = new RTCPeerConnection(); >+ >+ connectionA.onicecandidate = e => connectionB.addIceCandidate(e.candidate); >+ connectionB.onicecandidate = e => connectionA.addIceCandidate(e.candidate); >+ >+ connectionA.addTrack(src.captureStream().getVideoTracks()[0]); >+ connectionB.ontrack = e => vid.srcObject = new MediaStream([e.track]); >+ >+ const descriptionA = await connectionA.createOffer(); >+ connectionA.setLocalDescription(descriptionA); >+ await connectionB.setRemoteDescription(descriptionA); >+ >+ const descriptionB = await connectionB.createAnswer(); >+ connectionB.setLocalDescription(descriptionB); >+ connectionA.setRemoteDescription(descriptionB); >+}); >+</script>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 231645
:
441018
|
441701
|
442238
|
442254