Bug 167483 - [QuickLook] Make HTTP QuickLook tests work in Apple Internal DumpRenderTree
Summary: [QuickLook] Make HTTP QuickLook tests work in Apple Internal DumpRenderTree
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-26 18:34 PST by Daniel Bates
Modified: 2017-01-30 10:15 PST (History)
4 users (show)

See Also:


Attachments
Layout tests (15.80 KB, patch)
2017-01-26 18:51 PST, Daniel Bates
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-01-26 18:34:53 PST
We should write the tests in LayoutTests/http/tests/quicklook/ in terms of LayoutTest/resources/ui-helpers.js so that they can run in an Apple Internal build of Legacy WebKit.
Comment 1 Daniel Bates 2017-01-26 18:51:59 PST
Created attachment 299897 [details]
Layout tests
Comment 2 Andy Estes 2017-01-26 19:26:33 PST
Comment on attachment 299897 [details]
Layout tests

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

> LayoutTests/http/tests/quicklook/at-import-stylesheet-blocked.html:19
> +    // FIXME: For some reason the (x, y) coordinates of the hyperlink "Run test" is offset 2 pixels
> +    // in legacy WebKit (why?).
> +    var fudgeFactor = UIHelper.isWebKit2() ? 0 : 2;
> +    UIHelper.wait(UIHelper.activateAt(frame.offsetLeft + 5 + fudgeFactor, frame.offsetTop + 5 + fudgeFactor));

If this FIXME is ever addressed, you'll have to update 8 copies of this function. Can this be moved to a .js file?
Comment 3 Daniel Bates 2017-01-30 10:15:04 PST
(In reply to comment #2)
> Comment on attachment 299897 [details]
> Layout tests
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=299897&action=review
> 
> > LayoutTests/http/tests/quicklook/at-import-stylesheet-blocked.html:19
> > +    // FIXME: For some reason the (x, y) coordinates of the hyperlink "Run test" is offset 2 pixels
> > +    // in legacy WebKit (why?).
> > +    var fudgeFactor = UIHelper.isWebKit2() ? 0 : 2;
> > +    UIHelper.wait(UIHelper.activateAt(frame.offsetLeft + 5 + fudgeFactor, frame.offsetTop + 5 + fudgeFactor));
> 
> If this FIXME is ever addressed, you'll have to update 8 copies of this
> function. Can this be moved to a .js file?

Will move this function to a common file, LayoutTests/http/tests/quicklook/resources/tap-run-test-hyperlink.js, before landing.
Comment 4 Daniel Bates 2017-01-30 10:15:53 PST
Committed r211373: <http://trac.webkit.org/changeset/211373>