This introduces an implementation of the clipboard.setImageData API.
I did not find any complete documentation about how copying and
pasting images is supposed to work in Firefox, so I added many lines
of documentation based on experimenting and reading the source code.
The implementation is very similar to the Add-on SDK's implementation,
save for one difference: The third parameter to setTransferData is 0
instead of -1. Its significance is elaborated in ext-clipboard.js.
The newly added tests serve the following purposes:
- Verification that clipboard.setImageData is working as expected.
There is no way to test that pasting in an external application
really works, so we just check whether Firefox recognizes the
special image data by pasting in a contentEditable area.
- Test coverage for reading clipboard data via the "paste" event and
using event.clipboardData to access the pasted data, because this is
the only way to read non-text data in a WebExtension extension.
MozReview-Commit-ID: Ldrx7LCIta2