WebKit Bugzilla
Attachment 342005 Details for
Bug 186325
: DataInteractionTests ContentEditableToTextarea and ContentEditableToContentEditable are failing on recent iOS 12
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix typo in comment.
bug-186325-20180605164113.patch (text/plain), 4.76 KB, created by
Wenson Hsieh
on 2018-06-05 16:41:14 PDT
(
hide
)
Description:
Fix typo in comment.
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-06-05 16:41:14 PDT
Size:
4.76 KB
patch
obsolete
>Subversion Revision: 232519 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b08218d76f5e6653b3edb78e11f6bfa749669e33..0253c7905530139bd4b5f01b6609bc5e7289fd11 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,21 @@ >+2018-06-05 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ DataInteractionTests ContentEditableToTextarea and ContentEditableToContentEditable are failing on recent iOS 12 >+ https://bugs.webkit.org/show_bug.cgi?id=186325 >+ <rdar://problem/40527850> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tweak these API tests so that they're robust against changes to how NSAttributedStrings are serialized in item >+ providers ("public.rtf" vs. "com.apple.flat-rtfd"). Across all versions of iOS, just verify that either rich >+ text type is present in the list of dragged type identifiers, and that the rich text type is placed at a higher >+ fidelity than plain text. >+ >+ * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: >+ (checkRichTextTypePrecedesPlainTextType): >+ (TestWebKitAPI::TEST): >+ (checkTypeIdentifierPrecedesOtherTypeIdentifier): Deleted. >+ > 2018-06-05 Saam Barati <sbarati@apple.com> > > run-testmem should have a dry run option and an option to parse the stdout of executing the dry run >diff --git a/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm b/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm >index bf0d9295bfce882dccc05b5b49ec2081831b156a..d060a22e4efb69e09ddd72a9dd346e524af823f4 100644 >--- a/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm >+++ b/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm >@@ -118,12 +118,15 @@ static void checkSelectionRectsWithLogging(NSArray *expected, NSArray *observed) > EXPECT_TRUE([expected isEqualToArray:observed]); > } > >-static void checkTypeIdentifierPrecedesOtherTypeIdentifier(DataInteractionSimulator *simulator, NSString *firstType, NSString *secondType) >+static void checkRichTextTypePrecedesPlainTextType(DataInteractionSimulator *simulator) > { >+ // At least one of "com.apple.flat-rtfd" or "public.rtf" is expected to have higher precedence than "public.utf8-plain-text". > NSArray *registeredTypes = [simulator.sourceItemProviders.firstObject registeredTypeIdentifiers]; >- EXPECT_TRUE([registeredTypes containsObject:firstType]); >- EXPECT_TRUE([registeredTypes containsObject:secondType]); >- EXPECT_TRUE([registeredTypes indexOfObject:firstType] < [registeredTypes indexOfObject:secondType]); >+ auto indexOfRTFType = [registeredTypes indexOfObject:(NSString *)kUTTypeRTF]; >+ auto indexOfFlatRTFDType = [registeredTypes indexOfObject:(NSString *)kUTTypeFlatRTFD]; >+ auto indexOfPlainTextType = [registeredTypes indexOfObject:(NSString *)kUTTypeUTF8PlainText]; >+ EXPECT_NE((NSInteger)indexOfPlainTextType, NSNotFound); >+ EXPECT_TRUE((indexOfRTFType != NSNotFound && indexOfRTFType < indexOfPlainTextType) || (indexOfFlatRTFDType != NSNotFound && indexOfFlatRTFDType < indexOfPlainTextType)); > } > > static void checkFirstTypeIsPresentAndSecondTypeIsMissing(DataInteractionSimulator *simulator, CFStringRef firstType, CFStringRef secondType) >@@ -350,12 +353,7 @@ TEST(DataInteractionTests, ContentEditableToContentEditable) > EXPECT_TRUE([observedEventNames containsObject:DataInteractionOverEventName]); > EXPECT_TRUE([observedEventNames containsObject:DataInteractionPerformOperationEventName]); > checkSelectionRectsWithLogging(@[ makeCGRectValue(1, 201, 961, 227) ], [dataInteractionSimulator finalSelectionRects]); >-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000 >- NSString *richTextTypeIdentifier = (NSString *)kUTTypeRTF; >-#else >- NSString *richTextTypeIdentifier = (NSString *)kUTTypeRTFD; >-#endif >- checkTypeIdentifierPrecedesOtherTypeIdentifier(dataInteractionSimulator.get(), richTextTypeIdentifier, (NSString *)kUTTypeUTF8PlainText); >+ checkRichTextTypePrecedesPlainTextType(dataInteractionSimulator.get()); > } > > TEST(DataInteractionTests, ContentEditableToTextarea) >@@ -375,12 +373,7 @@ TEST(DataInteractionTests, ContentEditableToTextarea) > EXPECT_TRUE([observedEventNames containsObject:DataInteractionOverEventName]); > EXPECT_TRUE([observedEventNames containsObject:DataInteractionPerformOperationEventName]); > checkSelectionRectsWithLogging(@[ makeCGRectValue(6, 203, 990, 232) ], [dataInteractionSimulator finalSelectionRects]); >-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000 >- NSString *richTextTypeIdentifier = (NSString *)kUTTypeRTF; >-#else >- NSString *richTextTypeIdentifier = (NSString *)kUTTypeRTFD; >-#endif >- checkTypeIdentifierPrecedesOtherTypeIdentifier(dataInteractionSimulator.get(), richTextTypeIdentifier, (NSString *)kUTTypeUTF8PlainText); >+ checkRichTextTypePrecedesPlainTextType(dataInteractionSimulator.get()); > } > > TEST(DataInteractionTests, ContentEditableMoveParagraphs)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186325
:
342004
| 342005