Closed
Bug 1380346
Opened 7 years ago
Closed 7 years ago
Improve screenshare testing
Categories
(Core :: WebRTC: Audio/Video, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: dminor, Assigned: pehrsons)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
As per https://bugzilla.mozilla.org/show_bug.cgi?id=1379743#c5 we could do a lot better with our screenshare testing.
Comment 1•7 years ago
|
||
Should be doable to write a test that opens e.g. a black window then overtake it with a red window and check for pixel updates (after bug 1395289 I'd say in four quadrants of the capture).
Comment 2•7 years ago
|
||
We can do something similar to tests we already have for checking color here [1]
[1] https://dxr.mozilla.org/mozilla-central/rev/db7f19e26e571ae1dd309f5d2f387b06ba670c30/dom/media/tests/mochitest/test_peerConnection_replaceVideoThenRenegotiate.html#72
Assignee | ||
Comment 3•7 years ago
|
||
Agree. We can make a 4x4 canvas cover the entire viewport - then check a couple of pixels in each quadrant (they have different colors) in the screenshare to see that we get what we expect.
I can take this.
Assignee: nobody → apehrson
Rank: 25
Reporter | ||
Comment 4•7 years ago
|
||
There are also webrtc.org screensharing unit tests. They are not currently enabled, I'll file a separate bug to get them running.
Comment 5•7 years ago
|
||
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8908225 [details]
Bug 1380346 - Modernize test_gUM_basicScreenShare.html.
https://reviewboard.mozilla.org/r/179892/#review187772
::: dom/media/tests/mochitest/test_getUserMedia_basicScreenshare.html:62
(Diff revision 1)
> + await Promise.all([
> + () => testVideo.srcObject.getVideoTracks()[0].applyConstraints({
> mediaSource: 'screen',
> width: 200,
> height: 200,
> frameRate: {
> min: '5',
> max: '10'
> }
> - }
> - ];
> - return Promise.resolve()
> + }),
> + () => listenUntil(testVideo, "resize", () => true),
> + ]);
This is good. Another pattern I like is:
let p = listenUntil(testVideo, "resize", () => true);
await testVideo.srcObject.getVideoTracks()[0].applyConstraints(c);
await p;
I go back and forth on which is more readable.
Attachment #8908225 -
Flags: review?(jib) → review+
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8908226 [details]
Bug 1380346 - CaptureStreamTestHelper shouldn't need a full-size canvas to extract a pixel.
https://reviewboard.mozilla.org/r/179894/#review187776
::: dom/canvas/test/captureStream_common.js:62
(Diff revision 1)
> * |video| as an array of the pixel's color channels: [R,G,B,A]. Allows
> * optional scaling of the drawImage() call (so that a 1x1 black image
scaling is no longer optional afaict
::: dom/canvas/test/captureStream_common.js:66
(Diff revision 1)
> - getPixel: function (video, offsetX, offsetY, width, height) {
> + getPixel: function (video, offsetX, offsetY) {
> offsetX = offsetX || 0; // Set to 0 if not passed in.
> offsetY = offsetY || 0; // Set to 0 if not passed in.
use argument defaults to remove need for comment.
Attachment #8908226 -
Flags: review?(jib) → review+
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8908227 [details]
Bug 1380346 - Let CaptureStreamTestHelper2D.drawColor draw squares wherever you want.
https://reviewboard.mozilla.org/r/179896/#review187778
Attachment #8908227 -
Flags: review?(jib) → review+
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8908228 [details]
Bug 1380346 - Verify screensharing content in mochitest.
https://reviewboard.mozilla.org/r/179898/#review187780
\o/
::: commit-message-de597:6
(Diff revision 1)
> +Note that going fullscreen requires the tab (and window) to be in the foreground
> +and having focus.
maybe add this as a code comment as well?
::: dom/media/tests/mochitest/test_getUserMedia_basicScreenshare.html:36
(Diff revision 1)
> + {dx: 0, dy: 0},
> + {dx: 1, dy: 3},
> + {dx: 8, dy: 5},
> + ];
> + for (let {dx, dy} of areaSamples) {
> + let x = offsetX + dx + internalX;
trailing space
Attachment #8908228 -
Flags: review?(jib) → review+
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8908243 [details]
Bug 1380346 - Apply applyConstraints() properly.
https://reviewboard.mozilla.org/r/179904/#review187788
Attachment #8908243 -
Flags: review?(jib) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 20•7 years ago
|
||
Assertion failure on windows: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b1cda02d4f1fae6c85e96f82ac13690299fca3c1
Looks like we're capturing the mouse cursor on the wrong thread.
Assignee | ||
Comment 21•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 27•7 years ago
|
||
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/455e69f2d765
Modernize test_gUM_basicScreenShare.html. r=jib
https://hg.mozilla.org/integration/autoland/rev/7550c9bb04d7
CaptureStreamTestHelper shouldn't need a full-size canvas to extract a pixel. r=jib
https://hg.mozilla.org/integration/autoland/rev/7a17cc8d3069
Let CaptureStreamTestHelper2D.drawColor draw squares wherever you want. r=jib
https://hg.mozilla.org/integration/autoland/rev/5fd2e18c9007
Verify screensharing content in mochitest. r=jib
https://hg.mozilla.org/integration/autoland/rev/9498c22c35fe
Apply applyConstraints() properly. r=jib
Blocks: 1405083
Comment 28•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/455e69f2d765
https://hg.mozilla.org/mozilla-central/rev/7550c9bb04d7
https://hg.mozilla.org/mozilla-central/rev/7a17cc8d3069
https://hg.mozilla.org/mozilla-central/rev/5fd2e18c9007
https://hg.mozilla.org/mozilla-central/rev/9498c22c35fe
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Reporter | ||
Updated•7 years ago
|
Blocks: Screensharing
You need to log in
before you can comment on or make changes to this bug.
Description
•