Commit Graph

21 Commits

Author SHA1 Message Date
Andreas Pehrson
42655db1ea Bug 1380346 - Let CaptureStreamTestHelper2D.drawColor draw squares wherever you want. r=jib
It was supporting a simpler case of only drawing in the upper left corner of
the input canvas. This supports that by default still, but also allows the
caller to exactly specify coordinates and size of the rectangle to draw.

MozReview-Commit-ID: GVQh0HqejqU
2017-09-14 19:00:20 +02:00
Andreas Pehrson
c0b74d0ffd Bug 1380346 - CaptureStreamTestHelper shouldn't need a full-size canvas to extract a pixel. r=jib
Our previous strategy was to draw the *entire* video we wanted a pixel from to
a canvas, then extract the pixel we wanted from that. This was all right for
most of our cases where the video was sufficiently small.

However, drawImage is more powerful than that -- we really just need a 1x1
canvas and draw the pixel we want to look at straight in.

MozReview-Commit-ID: ATdFVY3YBUv
2017-09-14 18:57:12 +02:00
Andreas Pehrson
b84163445a Bug 1296531 - Let waitForPixel and friends take a cancelPromise. r=jib
MozReview-Commit-ID: 42hT181wkvq
2017-05-29 16:27:45 +02:00
Kartikaya Gupta
e9f793138f Bug 1376449 - Robustify startDrawing to prevent calling callback function after stop() has been called. r=pehrsons
MozReview-Commit-ID: 5vPtTHBGJhN
2017-06-27 13:55:45 -04:00
Andreas Pehrson
2bccd5816d Bug 1093835 - Commoditize checkVideoPlaying/checkVideoPaused. r=jib
This moves those two functions from a single test to a VideoStreamHelper in a
common file, so they can be used when checking video flow in multiple tests.

It also implements a VideoFrameEmitter that provides tests with an easy to
access video source where VideoStreamHelper can verify flow on the sink.

MozReview-Commit-ID: Fin9eiVmBe
2017-05-04 15:23:36 +02:00
Randell Jesup
ff5517de65 Bug 1250356: rollup of changes for webrtc after applying webrtc.org v49 update r=pkerr,ng,pehrsons,etc
See ssh://hg.mozilla.org/users/paulrkerr_gmail.com/webrtc49_merge/ for the
patch development history.
2016-12-27 19:41:02 -05:00
Andreas Pehrson
9f078588d6 Bug 1273314 - Log the caught error properly in CaptureStreamHelper. r=jib
MozReview-Commit-ID: 9T8G4Xyw69t
2016-09-30 17:24:43 +02:00
Andreas Pehrson
acccb83b4e Bug 1259788 - Add video content test for captureStream of MediaElement playing a MediaStream. r=jib
MozReview-Commit-ID: F6X0E0VeqP9
2016-08-18 17:37:19 +02:00
Andreas Pehrson
567b9d9f22 Bug 1208371 - Clear output canvas on each drawImage(). r=jib
Otherwise we'd risk reading old pixels in case we draw something
transparent.

MozReview-Commit-ID: LjNXE4Rmrmt
2016-01-05 10:16:32 +08:00
Randell Jesup
b6574eb979 Bug 1224029: ensure video elements that may be disabled (black) are scaled r=mattwoodrow
disabled video elements may be 1x1 black images

MozReview-Commit-ID: 6xTm8Eq1Tjs
2016-03-08 19:21:40 -05:00
Michael Froman
bf57584205 Bug 1166832 - Add test for canvas capture on multiple streams. r=bwc 2016-01-14 10:56:17 -06:00
Robert O'Callahan
a488b0e24b Bug 1223696. Don't destroy VideoFrameContainer when we reach MetadataLoaded without a video track. r=jwwang 2015-11-17 16:34:28 +13:00
Andreas Pehrson
81c9a00d73 Bug 1223696 - Make canvas captureStream helper resilient to exceptions when there's no video. r=roc 2015-11-16 10:58:13 +08:00
Carsten "Tomcat" Book
5dedbe0973 Backed out changeset 162ded2e49c8 (bug 1223696) for failing on own test on a CLOSED TREE 2015-11-23 09:48:56 +01:00
Robert O'Callahan
e5d8063391 Bug 1223696. Don't destroy VideoFrameContainer when we reach MetadataLoaded without a video track. r=jwwang 2015-11-17 16:34:28 +13:00
Andreas Pehrson
1248d034f8 Bug 1219711 - Refactor captureStream_common.js to accept generic pixel testing method. r=jib 2015-11-09 23:17:41 +08:00
Wes Kocher
e746cf73ed Backed out 5 changesets (bug 1219711) for frequent android m(9) failures a=bustage
Backed out changeset 2d5f09d89424 (bug 1219711)
Backed out changeset cf14a6e5f340 (bug 1219711)
Backed out changeset 4eaa8cf9a752 (bug 1219711)
Backed out changeset 65abe62869df (bug 1219711)
Backed out changeset a21d79a94307 (bug 1219711)
2015-11-06 11:14:11 -08:00
Andreas Pehrson
500de05b82 Bug 1219711 - Refactor captureStream_common.js to accept generic pixel testing method. r=jib 2015-11-05 17:15:50 +08:00
Andreas Pehrson
0905bf6260 Bug 1161913 - Part 3 - Relax requestFrame ordering guarantee in tests. r=mt
We used to fully guarantee the order of requestFrame() and draw calls.
For instance:
```
ctx.draw(red);
stream.requestFrame();
ctx.draw(green);
```
would guarantee that a red frame ended up in the stream, and not the
green unless another frame was requested.

Now with frames being requested and pushed out on next refresh, we can
only guarantee that everything up to the requestFrame() call is included
in the next frame. Everything after the requestFrame() and before the
next refresh (stable state in most cases) will now also be inevitably
included.
2015-09-17 11:37:05 +08:00
Jan-Ivar Bruaroey
4f1c20eccd Bug 1175523 - Update most (but not all) tests to use elem.srcObject over .mozSrcObject. r=pehrsons 2015-07-14 10:12:31 -04:00
Andreas Pehrson
1c9e15b5cb Bug 1032848 - Part 3: Add tests for HTMLCanvasElement::CaptureStream. r=mt, r=jgilbert, r=jesup 2015-05-13 14:04:51 +08:00