Add test and infrastructure for link popover
Created attachment 291526 [details] Patch
Comment on attachment 291526 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291526&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:26 > +#pragma once Don't add this, since Obj-C's #import already takes care of this. > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:274 > +- (void)didShowForcePressPreview WK_API_AVAILABLE(ios(WK_IOS_TBA)); > +- (void)didDismissForcePressPreview WK_API_AVAILABLE(ios(WK_IOS_TBA)); These should have leading underscores ("_didShowForcePressPreview") - the others need fixing too. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3851 > + if ([userInterfaceItem isEqualToString:@"popoverContents"]) { Blank line above please. > Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:125 > + // Preview form handling Maybe "Force press preview handling" > Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h:26 > +#pragma once No need. > LayoutTests/ChangeLog:9 > + * fast/events/touch/ios/iphone7/force-press-on-link-expected.txt: Added. > + * fast/events/touch/ios/iphone7/force-press-on-link.html: Added. Does the popover go away when this test is complete? > LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link.html:96 > + <a href="http://www.apple.com">Link Test</a> This should be a local URL, rather than loading a live web site.
Created attachment 291882 [details] Patch
Attachment 291882 [details] did not pass style-queue: ERROR: Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h:0: Use #pragma once header guard. [build/header_guard] [5] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:0: Use #pragma once header guard. [build/header_guard] [5] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 291882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291882&action=review Good patch, but the test needs tweaking. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3852 > + if ([userInterfaceItem isEqualToString:@"popoverContents"]) { @"popoverContents" seems a bit too generic; I think it should be @"linkPreviewPopoverURL" or something. > LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link.html:56 > + uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('popoverContents'))); > + uiController.liftUpAtPoint(20,40,1,function() {}); This is racey. In the uiController.uiScriptComplete() callback, the web process does testRunner.notifyDone(), so may start moving onto the next test. What you should do instead is have a second testRunner.runUIScript() below, have that fire the uiController.liftUpAtPoint(), and only notifyDone() when that second one completes.
Created attachment 291900 [details] Patch
Attachment 291900 [details] did not pass style-queue: ERROR: Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h:0: Use #pragma once header guard. [build/header_guard] [5] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:0: Use #pragma once header guard. [build/header_guard] [5] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 291900 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291900&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3854 > + return @{ userInterfaceItem: @{@"pageURL": url}}; Perferred spacing here would be: @{ userInterfaceItem: @{ @"pageURL": url } }; > LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link.html:65 > + uiController.liftUpAtPoint(20,40,1,function() { Spaces after commas please. > LayoutTests/fast/events/touch/ios/iphone7/force-press-on-link.html:87 > + document.getElementById('target').innerHTML = output; I think it's OK to do this before this testRunner.runUIScript() invocation.
Created attachment 291904 [details] Patch
Attachment 291904 [details] did not pass style-queue: ERROR: Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h:0: Use #pragma once header guard. [build/header_guard] [5] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:0: Use #pragma once header guard. [build/header_guard] [5] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 291904 [details] Patch Clearing flags on attachment: 291904 Committed r207447: <http://trac.webkit.org/changeset/207447>
All reviewed patches have been landed. Closing bug.