Add tests for the new drawSnapshot API
Categories
(Core :: Graphics, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: whimboo, Assigned: mattwoodrow, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
As spoken with Matt on IRC there are currently no tests for this new API. It would be very helpful to have at least a basic set of tests to verify its functionality.
It's not a real hard-blocker for bug 1559592, but it would be good to keep track of it, and to not downgrade the reliability for users of Marionette and geckodriver.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D41826
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D41827
Assignee | ||
Updated•5 years ago
|
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b4feec0a4e2 Add SpecialPowers API for calling drawSnapshot in the parent and returning the results. r=kmag https://hg.mozilla.org/integration/autoland/rev/4d528be8bae4 Modify existing drawWindow tests to take a callback for the inner draw function. r=kmag https://hg.mozilla.org/integration/autoland/rev/7a24b9027519 Add test for drawSnapshot. r=kmag
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b5d442a2f457 Fix linting error in file_drawWindow_common.js r=lint-fix CLOSED TREE
Backout by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1f3fcdc28dfd Backed out 4 changesets for causing failures in test_drawSnapshot.html
Comment 7•5 years ago
|
||
Backed out 4 changesets for causing failures in test_drawSnapshot.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/1f3fcdc28dfd
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=261745754&repo=autoland&lineNumber=4992
[task 2019-08-15T08:11:26.643Z] 08:11:26 INFO - 1701 INFO TEST-START | dom/canvas/test/test_drawSnapshot.html
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - Buffered messages logged at 08:11:25
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - 1702 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: == full draw of source on white background reference
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - 1703 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: != full draw of source on yellow background reference
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - 1704 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: == full draw of source on yellow background reference
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - 1705 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: == draw of subrect of source with matching background reference
[task 2019-08-15T08:16:34.624Z] 08:16:34 INFO - 1706 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: == draw of subrect of source with different background reference
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1707 INFO TEST-PASS | dom/canvas/test/test_drawSnapshot.html | reftest comparison: == draw of subrect of source with different background reference
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - Buffered messages finished
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1708 INFO TEST-UNEXPECTED-FAIL | dom/canvas/test/test_drawSnapshot.html | Test timed out.
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:275:18
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - reportError@SimpleTest/TestRunner.js:121:22
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - TestRunner._checkForHangs@SimpleTest/TestRunner.js:142:18
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1709 INFO TEST-OK | dom/canvas/test/test_drawSnapshot.html | took 301923ms
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1710 INFO TEST-START | dom/canvas/test/test_drawWindow.html
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1711 INFO TEST-OK | dom/canvas/test/test_drawWindow.html | took 300ms
[task 2019-08-15T08:16:34.625Z] 08:16:34 INFO - 1712 INFO TEST-START | dom/canvas/test/test_filter.html
[task 2019-08-15T08:16:34.626Z] 08:16:34 INFO - 1713 INFO TEST-OK | dom/canvas/test/test_filter.html | took 80ms
Reporter | ||
Comment 8•5 years ago
|
||
Matt, I have a problem to get the fix from bug 1571341 working from within JS. Also I do not see any test here which utilizes the new flags
argument. Would you mind adding one, or explain how it should work? Whatever values I use for the flags, I actually do not see a difference. Not sure what I'm doing wrong. Thanks.
Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #8)
Matt, I have a problem to get the fix from bug 1571341 working from within JS. Also I do not see any test here which utilizes the new
flags
argument. Would you mind adding one, or explain how it should work? Whatever values I use for the flags, I actually do not see a difference. Not sure what I'm doing wrong. Thanks.
I went through all the drawWindow callers, and the only ones using the DRAW_VIEW flag were also using USE_WIDGET_LAYERS. Given that we're not supporting the USE_WIDGET_LAYERS use case with this API, I just removed the flags bit entirely for now.
Snapshotting whole documents (outside of the viewport) seems to work for me though, does it not for you?
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D41828
Comment 11•5 years ago
|
||
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19443ebbd552 Add SpecialPowers API for calling drawSnapshot in the parent and returning the results. r=kmag https://hg.mozilla.org/integration/autoland/rev/7ef0d6f34119 Modify existing drawWindow tests to take a callback for the inner draw function. r=kmag https://hg.mozilla.org/integration/autoland/rev/db86b932e899 Add test for drawSnapshot. r=kmag https://hg.mozilla.org/integration/autoland/rev/11919743f599 Use a Set for HiddenFrame.jsm, so that GC can't clean up frames that we're sitll waiting on. r=kmag
Reporter | ||
Comment 12•5 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #9)
Snapshotting whole documents (outside of the viewport) seems to work for me though, does it not for you?
The problem I have is actually with Bugzilla like this page. If you try to screenshot you only get the current viewport. But talking to different people yesterday the problem seems to be the overlay Bugzilla uses for top-level scrolling. I assume there is no way to create a screenshot of the full document?
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/19443ebbd552
https://hg.mozilla.org/mozilla-central/rev/7ef0d6f34119
https://hg.mozilla.org/mozilla-central/rev/db86b932e899
https://hg.mozilla.org/mozilla-central/rev/11919743f599
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #12)
(In reply to Matt Woodrow (:mattwoodrow) from comment #9)
Snapshotting whole documents (outside of the viewport) seems to work for me though, does it not for you?
The problem I have is actually with Bugzilla like this page. If you try to screenshot you only get the current viewport. But talking to different people yesterday the problem seems to be the overlay Bugzilla uses for top-level scrolling. I assume there is no way to create a screenshot of the full document?
Indeed, there's no easy way to do this sorry.
We have hacks in the platform to handle the case where the page itself scrolls within the viewport, to let us capture the full page without it being clipped to the viewport.
Pages like bugzilla that don't scroll, but instead use a viewport-sized element that has scrolled contents aren't supported in this way.
Reporter | ||
Comment 15•5 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #14)
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #12)
(In reply to Matt Woodrow (:mattwoodrow) from comment #9)
Snapshotting whole documents (outside of the viewport) seems to work for me though, does it not for you?
The problem I have is actually with Bugzilla like this page. If you try to screenshot you only get the current viewport. But talking to different people yesterday the problem seems to be the overlay Bugzilla uses for top-level scrolling. I assume there is no way to create a screenshot of the full document?
Indeed, there's no easy way to do this sorry.
We have hacks in the platform to handle the case where the page itself scrolls within the viewport, to let us capture the full page without it being clipped to the viewport.
Pages like bugzilla that don't scroll, but instead use a viewport-sized element that has scrolled contents aren't supported in this way.
Thanks Matt. Slightly off-topic now but let me ask a remaining last question to Dylan... Dylan, is there something possible with the design of Bugzilla to improve that? Maybe we should file a new bug in the Bugzilla component, if it is. Thanks
Description
•