[iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
Created attachment 295243 [details] Patch
Depends on the patch in bug 164967.
Created attachment 295246 [details] Patch
Attachment 295246 [details] did not pass style-queue: ERROR: Source/WebCore/testing/Internals.cpp:858: EVENT_THROTTLING_BEHAVIOR_RESPONSIVE is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/Internals.cpp:859: EVENT_THROTTLING_BEHAVIOR_UNRESPONSIVE is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 295246 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295246&action=review r=me with suggestion > Source/WebCore/testing/Internals.idl:333 > + attribute unsigned short? eventThrottlingBehaviorOverride; The modern way of doing this would be to use a string enumeration in IDL. enum EventThrottlingBehavior { "responsive", "unresponsive" }; attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride; Also, is there really a need for this to be nullable? It seems we could just return "responsive" by default. Finally, given your comment, shouldn't this be in a #if PLATFORM(IOS) block?
Comment on attachment 295246 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295246&action=review > LayoutTests/fast/scrolling/ios/scroll-events-default-expected.txt:1 > +PASS receivedScrollEvent is true nit: It'd be nice for those tests to have a description("...");
(In reply to comment #5) > Comment on attachment 295246 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=295246&action=review > > r=me with suggestion > > > Source/WebCore/testing/Internals.idl:333 > > + attribute unsigned short? eventThrottlingBehaviorOverride; > > The modern way of doing this would be to use a string enumeration in IDL. > > enum EventThrottlingBehavior { "responsive", "unresponsive" }; > attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride; Nice, will do that. > Also, is there really a need for this to be nullable? It seems we could just > return "responsive" by default. I made it nullable to remove the override entirely. > Finally, given your comment, shouldn't this be in a #if PLATFORM(IOS) block? It only impacts iOS, but I'd prefer to not conditionalize the internals API because it makes cross-platform tests harder to write.
Committed r208921: <http://trac.webkit.org/changeset/208921>