Bug 175509

Summary: [iOS WK2] Add a version of DataInteractionTests.ExternalSourceAttributedStringToContentEditable that doesn't hit a debug assertion
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, megan_gardner, rniwa, thorton
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
rniwa: review+
Patch for landing none

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>