Bug 175509 - [iOS WK2] Add a version of DataInteractionTests.ExternalSourceAttributedStringToContentEditable that doesn't hit a debug assertion
Summary: [iOS WK2] Add a version of DataInteractionTests.ExternalSourceAttributedStrin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-12 02:42 PDT by Wenson Hsieh
Modified: 2017-08-20 01:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.56 KB, patch)
2017-08-12 03:02 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (3.81 KB, patch)
2017-08-18 13:33 PDT, Wenson Hsieh
rniwa: review+
Details | Formatted Diff | Diff
Patch for landing (3.99 KB, patch)
2017-08-19 01:04 PDT, 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 2017-08-12 02:42:29 PDT
This test is hitting a debug assertion after a recent SDK update. Instead of using [UIFont boldSystemFontOfSize:] to test that attributed strings preserve styles when dropping, use a foreground color and check that the resulting inserted text is colored in the DOM.
Comment 1 Wenson Hsieh 2017-08-12 02:44:41 PDT
<rdar://problem/33728169>
Comment 2 Wenson Hsieh 2017-08-12 03:02:23 PDT
Created attachment 317993 [details]
Patch
Comment 3 Megan Gardner 2017-08-12 15:08:29 PDT
This looks good, minus it not working on iOS-sim. I thought that the call you switched to might be too new for the perf bots, but it seems to be fine.
Comment 4 Wenson Hsieh 2017-08-12 15:13:00 PDT
(In reply to Megan Gardner from comment #3)
> This looks good, minus it not working on iOS-sim. I thought that the call
> you switched to might be too new for the perf bots, but it seems to be fine.

Thanks for taking a look!

Unfortunately, these API tests are not run on the EWS bots at all. The test failures making 'ios-sim' orange in the dashboard are unrelated:

- imported/w3c/web-platform-tests/fetch/
- imported/w3c/web-platform-tests/cors/
- imported/w3c/web-platform-tests/XMLHttpRequest/
- imported/w3c/web-platform-tests/beacon/
- http/tests/blink/sendbeacon/
- http/wpt/beacon/
Comment 5 Megan Gardner 2017-08-12 15:19:16 PDT
Oh, I forgot that they don't run. LGTM then!

(In reply to Wenson Hsieh from comment #4)
> (In reply to Megan Gardner from comment #3)
> > This looks good, minus it not working on iOS-sim. I thought that the call
> > you switched to might be too new for the perf bots, but it seems to be fine.
> 
> Thanks for taking a look!
> 
> Unfortunately, these API tests are not run on the EWS bots at all. The test
> failures making 'ios-sim' orange in the dashboard are unrelated:
> 
> - imported/w3c/web-platform-tests/fetch/
> - imported/w3c/web-platform-tests/cors/
> - imported/w3c/web-platform-tests/XMLHttpRequest/
> - imported/w3c/web-platform-tests/beacon/
> - http/tests/blink/sendbeacon/
> - http/wpt/beacon/
Comment 6 Wenson Hsieh 2017-08-18 13:33:23 PDT
Created attachment 318536 [details]
Patch
Comment 7 Wenson Hsieh 2017-08-18 13:34:53 PDT
Tim and I chatted in person -- we're going to keep the debug-assertion-ing test, but mark it as disabled, and add a new test that fulfills the same purpose (w.r.t. testing attributed strings and DnD) but uses color instead to ensure that we don't leave this codepath untested.
Comment 8 Ryosuke Niwa 2017-08-18 23:18:42 PDT
Comment on attachment 318536 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318536&action=review

> Tools/ChangeLog:11
> +        Clone ExternalSourceAttributedStringToContentEditable to ExternalSourceColoredAttributedStringToContentEditable,
> +        which tests an attributed string with colored text instead of a bold attributed string of system font. Due to a
> +        recent change in behavior in UIKit, this test is hitting a debug assertion. The purpose of this test is to verify

Could you clarify that you're adding a test which changes color because bold case is crashing.
Comment 9 Wenson Hsieh 2017-08-19 00:39:21 PDT
Comment on attachment 318536 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318536&action=review

>> Tools/ChangeLog:11
>> +        recent change in behavior in UIKit, this test is hitting a debug assertion. The purpose of this test is to verify
> 
> Could you clarify that you're adding a test which changes color because bold case is crashing.

Will do!
Comment 10 Wenson Hsieh 2017-08-19 01:04:35 PDT
Created attachment 318584 [details]
Patch for landing
Comment 11 WebKit Commit Bot 2017-08-19 01:46:20 PDT
Comment on attachment 318584 [details]
Patch for landing

Clearing flags on attachment: 318584

Committed r220952: <http://trac.webkit.org/changeset/220952>