[webkit-reviews] review granted: [Bug 174001] Add API to get WKActivatedElementInfo : [Attachment 314348] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 30 19:04:17 PDT 2017


Tim Horton <thorton at apple.com> has granted Megan Gardner
<megan_gardner at apple.com>'s request for review:
Bug 174001: Add API to get WKActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=174001

Attachment 314348: Patch

https://bugs.webkit.org/attachment.cgi?id=314348&action=review




--- Comment #20 from Tim Horton <thorton at apple.com> ---
Comment on attachment 314348
  --> https://bugs.webkit.org/attachment.cgi?id=314348
Patch

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

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:46
> +    webView.get().scrollView.contentOffset = CGPointMake(0, 50);
> +    webView.get().scrollView.zoomScale = 2.0;

I think smfr meant to make it so that the test would only pass if your hit
testing was taking zoom/scrolling into account, but since your element is
100%x100%, it will pass regardless. That could be a separate test (and move
these setters there). Doesn't necessarily need to happen with this patch, but
should happen.

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:52
> +	   EXPECT_TRUE([elementInfo.URL.absoluteString
isEqual:@"testURL.test"]);

Whatever happened to EXPECT_WK_STREQ?

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:55
> +	   EXPECT_TRUE(elementInfo.image != nil);

EXPECT_NOT_NULL?


More information about the webkit-reviews mailing list