Bug 164980 - [iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
Summary: [iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 18:56 PST by Simon Fraser (smfr)
Modified: 2016-11-18 23:35 PST (History)
7 users (show)

See Also:


Attachments
Patch (20.41 KB, patch)
2016-11-18 18:59 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (20.32 KB, patch)
2016-11-18 20:32 PST, Simon Fraser (smfr)
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2016-11-18 18:56:02 PST
[iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
Comment 1 Simon Fraser (smfr) 2016-11-18 18:59:31 PST
Created attachment 295243 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-11-18 18:59:55 PST
Depends on the patch in bug 164967.
Comment 3 Simon Fraser (smfr) 2016-11-18 20:32:47 PST
Created attachment 295246 [details]
Patch
Comment 4 WebKit Commit Bot 2016-11-18 20:34:34 PST
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 5 Chris Dumez 2016-11-18 21:04:11 PST
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 6 Chris Dumez 2016-11-18 21:05:15 PST
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("...");
Comment 7 Simon Fraser (smfr) 2016-11-18 21:15:15 PST
(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.
Comment 8 Simon Fraser (smfr) 2016-11-18 23:35:58 PST
Committed r208921: <http://trac.webkit.org/changeset/208921>