New issue
Advanced search Search tips

Issue 906276 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocked on:
issue 906266



Sign in to add a comment

Fix clipboard-image-paste-types.html to copy an image as opposed to an iframe

Project Member Reported by huangdarwin@google.com, Nov 16

Issue description

clipboard-image-paste-types.html from http://crrev.com/c/1319032, as well as all tests regarding image copying, currently copy via document.execCommand('copy'), which only seems to copy images loaded as a src in <iframe>s (iframe.contentWindow.document.execCommand('copy');). 

After we can copy <image> nodes, these tests should test by copying an image node (instead of iframe nodes), which can lead to uncovering different/more types on the clipboard. This can be fixed, in this test (and in most tests), by switching the node loading the image from <iframe> to <image> type, and ensuring that alt text is included on the image.

In clipboard-image-paste-types.html, this will ensure that text/plain isn't copied, and that the linked CL did in fact remove the text/plain payload as intended. This was, before the linked CL, only exposed when copying image DOM elements with alt text on Mac.
 
Status: Assigned (was: Available)

Sign in to add a comment