Bug 182307 - [iOS] API test UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations fails after r223440
Summary: [iOS] API test UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepres...
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
Keywords: InRadar
Depends on:
Reported: 2018-01-30 13:49 PST by Wenson Hsieh
Modified: 2018-01-30 15:06 PST (History)
6 users (show)

See Also:

Patch (4.59 KB, patch)
2018-01-30 14:28 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2018-01-30 13:49:40 PST
After <https://trac.webkit.org/r223440>, we now always deliver sanitized markup if the page asks for "text/html" from a DataTransfer. UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations writes "public.html" to the UIPasteboard using platform API, and then checks for the value of DataTransfer.getData('text/html') when pasting. After r223440, the requested HTML now contains inline styles, where it was simply the markup string written by the platform before.
Comment 1 Wenson Hsieh 2018-01-30 13:49:59 PST
Comment 2 Wenson Hsieh 2018-01-30 14:22:25 PST
This is very similar to the existing tests PasteHTML.SanitizesHTML (and PasteWebArchive.SanitizesHTML, which is for macOS only). In both cases, we're writing web content to the pasteboard via platform API, and then expecting sanitized markup for "text/html".

Both the aforementioned tests are indifferent to specific inline styles captured in the sanitized markup, so this failing test should be updated to match.
Comment 3 Wenson Hsieh 2018-01-30 14:28:12 PST
Created attachment 332709 [details]
Comment 4 Wenson Hsieh 2018-01-30 14:32:36 PST
Comment on attachment 332709 [details]

Thanks for the review!
Comment 5 WebKit Commit Bot 2018-01-30 15:06:01 PST
Comment on attachment 332709 [details]

Clearing flags on attachment: 332709

Committed r227859: <https://trac.webkit.org/changeset/227859>
Comment 6 WebKit Commit Bot 2018-01-30 15:06:03 PST
All reviewed patches have been landed.  Closing bug.