Changeset 252309 in webkit


Ignore:
Timestamp:
Nov 9, 2019 12:14:37 PM (4 years ago)
Author:
dino@apple.com
Message:

Clicky Orbing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
https://bugs.webkit.org/show_bug.cgi?id=204037
<rdar://55614939>

Reviewed by Simon Fraser.

Source/WebKit:

When Safari adopted the ContextMenu API they began providing a PreviewViewController that
showed the image rather than the link, for the case of <a><img></a>.

This could be fixed in Safari, but I noticed that we actually tell the delegate that the
type of the activated element is an image, which is why they treat it as such. It's not
clear that because the image also has a link attached, a client should defer to the link.

Instead, I think it makes more sense to identify this as a link, because that is the more
important information in this API.

While here I also changed the logic to make sure we call the API if both the API and SPI
are available.

New ContextMenus and WKRequestActivatedElementInfo API tests.

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: Identify as a link if you have a link.

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):

  • UIProcess/ios/WKContentViewInteraction.mm: Look for the API before the SPI.

(-[WKContentView continueContextMenuInteraction:]):

Tools:

New tests for a link wrapping an image, and the ordering of API and SPI.

Rename these tests so that they are much easier to filter on the command line.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(TEST):
(-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuWillPresentForElement:]):

  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/image.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/link-with-image.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r252303 r252309  
     12019-11-09  Dean Jackson  <dino@apple.com>
     2
     3        Clicky Orbing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
     4        https://bugs.webkit.org/show_bug.cgi?id=204037
     5        <rdar://55614939>
     6
     7        Reviewed by Simon Fraser.
     8
     9        When Safari adopted the ContextMenu API they began providing a PreviewViewController that
     10        showed the image rather than the link, for the case of <a><img></a>.
     11
     12        This could be fixed in Safari, but I noticed that we actually tell the delegate that the
     13        type of the activated element is an image, which is why they treat it as such. It's not
     14        clear that because the image also has a link attached, a client should defer to the link.
     15
     16        Instead, I think it makes more sense to identify this as a link, because that is the more
     17        important information in this API.
     18
     19        While here I also changed the logic to make sure we call the API if both the API and SPI
     20        are available.
     21
     22        New ContextMenus and WKRequestActivatedElementInfo API tests.
     23
     24        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: Identify as a link if you have a link.
     25        (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
     26        * UIProcess/ios/WKContentViewInteraction.mm: Look for the API before the SPI.
     27        (-[WKContentView continueContextMenuInteraction:]):
     28
    1292019-11-08  Brady Eidson  <beidson@apple.com>
    230
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm

    r249171 r252309  
    7474    if (information.isAttachment)
    7575        _type = _WKActivatedElementTypeAttachment;
     76    else if (information.isLink)
     77        _type = _WKActivatedElementTypeLink;
    7678    else if (information.isImage)
    7779        _type = _WKActivatedElementTypeImage;
    78     else if (information.isLink)
    79         _type = _WKActivatedElementTypeLink;
    8080    else
    8181        _type = _WKActivatedElementTypeUnspecified;
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r251847 r252309  
    83838383    _contextMenuActionProviderDelegateNeedsOverride = NO;
    83848384    _contextMenuElementInfo = wrapper(API::ContextMenuElementInfo::create(_positionInformation, nil));
    8385     if ([uiDelegate respondsToSelector:@selector(_webView:contextMenuConfigurationForElement:completionHandler:)]) {
    8386         if (_positionInformation.isImage && _positionInformation.url.isNull() && [uiDelegate respondsToSelector:@selector(_webView:alternateURLFromImage:userInfo:)]) {
    8387             UIImage *uiImage = [[_contextMenuElementInfo _activatedElementInfo] image];
    8388             NSDictionary *userInfo = nil;
    8389             NSURL *nsURL = [uiDelegate _webView:_webView alternateURLFromImage:uiImage userInfo:&userInfo];
    8390             _positionInformation.url = nsURL;
    8391             _contextMenuElementInfo = wrapper(API::ContextMenuElementInfo::create(_positionInformation, userInfo));
    8392         }
    8393 
    8394         auto checker = WebKit::CompletionHandlerCallChecker::create(uiDelegate, @selector(_webView:contextMenuConfigurationForElement:completionHandler:));
    8395         [uiDelegate _webView:_webView contextMenuConfigurationForElement:_contextMenuElementInfo.get() completionHandler:makeBlockPtr([completionBlock = WTFMove(completionBlock), checker = WTFMove(checker)] (UIContextMenuConfiguration *configuration) {
     8385
     8386    if (_positionInformation.isImage && _positionInformation.url.isNull() && [uiDelegate respondsToSelector:@selector(_webView:alternateURLFromImage:userInfo:)]) {
     8387        UIImage *uiImage = [[_contextMenuElementInfo _activatedElementInfo] image];
     8388        NSDictionary *userInfo = nil;
     8389        NSURL *nsURL = [uiDelegate _webView:_webView alternateURLFromImage:uiImage userInfo:&userInfo];
     8390        _positionInformation.url = nsURL;
     8391        _contextMenuElementInfo = wrapper(API::ContextMenuElementInfo::create(_positionInformation, userInfo));
     8392    }
     8393
     8394    if (_positionInformation.isLink && [uiDelegate respondsToSelector:@selector(webView:contextMenuConfigurationForElement:completionHandler:)]) {
     8395        auto checker = WebKit::CompletionHandlerCallChecker::create(uiDelegate, @selector(webView:contextMenuConfigurationForElement:completionHandler:));
     8396        [uiDelegate webView:_webView contextMenuConfigurationForElement:_contextMenuElementInfo.get() completionHandler:makeBlockPtr([completionBlock = WTFMove(completionBlock), checker = WTFMove(checker)] (UIContextMenuConfiguration *configuration) {
    83968397            if (checker->completionHandlerHasBeenCalled())
    83978398                return;
     
    83998400            completionBlock(configuration);
    84008401        }).get()];
    8401     } else if (_positionInformation.isLink && [uiDelegate respondsToSelector:@selector(webView:contextMenuConfigurationForElement:completionHandler:)]) {
    8402         auto checker = WebKit::CompletionHandlerCallChecker::create(uiDelegate, @selector(webView:contextMenuConfigurationForElement:completionHandler:));
    8403         [uiDelegate webView:_webView contextMenuConfigurationForElement:_contextMenuElementInfo.get() completionHandler:makeBlockPtr([completionBlock = WTFMove(completionBlock), checker = WTFMove(checker)] (UIContextMenuConfiguration *configuration) {
     8402    } else if ([uiDelegate respondsToSelector:@selector(_webView:contextMenuConfigurationForElement:completionHandler:)]) {
     8403        auto checker = WebKit::CompletionHandlerCallChecker::create(uiDelegate, @selector(_webView:contextMenuConfigurationForElement:completionHandler:));
     8404        [uiDelegate _webView:_webView contextMenuConfigurationForElement:_contextMenuElementInfo.get() completionHandler:makeBlockPtr([completionBlock = WTFMove(completionBlock), checker = WTFMove(checker)] (UIContextMenuConfiguration *configuration) {
    84048405            if (checker->completionHandlerHasBeenCalled())
    84058406                return;
  • trunk/Tools/ChangeLog

    r252303 r252309  
     12019-11-09  Dean Jackson  <dino@apple.com>
     2
     3        Clicky Orbing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
     4        https://bugs.webkit.org/show_bug.cgi?id=204037
     5        <rdar://55614939>
     6
     7        Reviewed by Simon Fraser.
     8
     9        New tests for a link wrapping an image, and the ordering of API and SPI.
     10
     11        Rename these tests so that they are much easier to filter on the command line.
     12
     13        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     14        * TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
     15        (TEST):
     16        (-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
     17        (-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
     18        (-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuWillPresentForElement:]):
     19        * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
     20        (TestWebKitAPI::TEST):
     21        * TestWebKitAPI/Tests/WebKitCocoa/image.html: Added.
     22        * TestWebKitAPI/Tests/WebKitCocoa/link-with-image.html: Added.
     23
    1242019-11-08  Brady Eidson  <beidson@apple.com>
    225
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r252303 r252309  
    178178                2EFF06CD1D8A429A0004BB30 /* input-field-in-scrollable-document.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2EFF06CC1D8A42910004BB30 /* input-field-in-scrollable-document.html */; };
    179179                2EFF06D71D8AF34A0004BB30 /* WKWebViewCandidateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */; };
     180                3128A81323763FAC00D90D40 /* link-with-image.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 3128A81223763F0B00D90D40 /* link-with-image.html */; };
     181                3128A8152376413300D90D40 /* image.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 3128A814237640FD00D90D40 /* image.html */; };
    180182                313C3A0221E567C300DBA86E /* SystemPreviewBlobNaming.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 313C3A0121E5677A00DBA86E /* SystemPreviewBlobNaming.html */; };
    181183                315118101DB1AE4000176304 /* ExtendedColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3151180F1DB1ADD500176304 /* ExtendedColor.cpp */; };
     
    12871289                                F4DEF6ED1E9B4DB60048EF61 /* image-in-link-and-input.html in Copy Resources */,
    12881290                                F45B63FB1F197F4A009D38B9 /* image-map.html in Copy Resources */,
     1291                                3128A8152376413300D90D40 /* image.html in Copy Resources */,
    12891292                                7283A9D022FA754900B21C7D /* img-with-rotated-image.html in Copy Resources */,
    12901293                                935786CD20F6A2910000CDFC /* IndexedDB.sqlite3 in Copy Resources */,
     
    13451348                                8361F1781E610B4E00759B25 /* link-with-download-attribute-with-slashes.html in Copy Resources */,
    13461349                                8349D3C41DB9728E004A9F65 /* link-with-download-attribute.html in Copy Resources */,
     1350                                3128A81323763FAC00D90D40 /* link-with-image.html in Copy Resources */,
    13471351                                378E64791632707400B6C676 /* link-with-title.html in Copy Resources */,
    13481352                                573255A622139BC700396AE8 /* load-web-archive-1.html in Copy Resources */,
     
    16781682                2EFF06D31D8AEDBB0004BB30 /* TestWKWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestWKWebView.mm; path = cocoa/TestWKWebView.mm; sourceTree = "<group>"; };
    16791683                2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewCandidateTests.mm; sourceTree = "<group>"; };
     1684                3128A81223763F0B00D90D40 /* link-with-image.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "link-with-image.html"; sourceTree = "<group>"; };
     1685                3128A814237640FD00D90D40 /* image.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = image.html; sourceTree = "<group>"; };
    16801686                313C3A0121E5677A00DBA86E /* SystemPreviewBlobNaming.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = SystemPreviewBlobNaming.html; sourceTree = "<group>"; };
    16811687                3151180F1DB1ADD500176304 /* ExtendedColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtendedColor.cpp; sourceTree = "<group>"; };
     
    33353341                                F4DEF6EC1E9B4D950048EF61 /* image-in-link-and-input.html */,
    33363342                                F45B63FA1F197F33009D38B9 /* image-map.html */,
     3343                                3128A814237640FD00D90D40 /* image.html */,
    33373344                                7283A9CE22FA6BBE00B21C7D /* img-with-rotated-image.html */,
    33383345                                934FA5C720F69FEE0040DC1B /* IndexedDB.sqlite3 */,
     
    33833390                                F41AB99D1EF4692C0083FA08 /* link-and-target-div.html */,
    33843391                                F46128D1211E2D2500D9FADB /* link-in-iframe-and-input.html */,
     3392                                3128A81223763F0B00D90D40 /* link-with-image.html */,
    33853393                                CA7787FE228CEFC700E50463 /* local-storage-process-crashes.html */,
    33863394                                9368A25D229EFB3A00A829CA /* local-storage-process-suspends-1.html */,
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm

    r250403 r252309  
    3636
    3737static bool contextMenuRequested;
     38static bool contextMenuSPIRequested;
    3839static bool willPresentCalled;
    3940static bool willCommitCalled;
     
    100101@end
    101102
    102 TEST(WebKit, ContextMenuClick)
     103TEST(ContextMenu, Click)
    103104{
    104105    auto driver = contextMenuWebViewDriver([TestContextMenuUIDelegate class]);
     
    115116}
    116117
    117 TEST(WebKit, ContextMenuEnd)
     118TEST(ContextMenu, End)
    118119{
    119120    auto driver = contextMenuWebViewDriver([TestContextMenuUIDelegate class]);
     
    129130}
    130131
     132@interface TestContextMenuAPIBeforeSPIUIDelegate : NSObject <WKUIDelegate>
     133@end
     134
     135@implementation TestContextMenuAPIBeforeSPIUIDelegate
     136
     137- (void)webView:(WKWebView *)webView contextMenuConfigurationForElement:(WKContextMenuElementInfo *)elementInfo completionHandler:(void(^)(UIContextMenuConfiguration * _Nullable))completionHandler
     138{
     139    contextMenuRequested = true;
     140    UIContextMenuContentPreviewProvider previewProvider = ^UIViewController * ()
     141    {
     142        return [[[UIViewController alloc] init] autorelease];
     143    };
     144    UIContextMenuActionProvider actionProvider = ^UIMenu *(NSArray<UIMenuElement *> *suggestedActions)
     145    {
     146        return [UIMenu menuWithTitle:@"" children:suggestedActions];
     147    };
     148    completionHandler([UIContextMenuConfiguration configurationWithIdentifier:nil previewProvider:previewProvider actionProvider:actionProvider]);
     149}
     150
     151- (void)_webView:(WKWebView *)webView contextMenuConfigurationForElement:(WKContextMenuElementInfo *)elementInfo completionHandler:(void(^)(UIContextMenuConfiguration * _Nullable))completionHandler
     152{
     153    contextMenuSPIRequested = true;
     154    completionHandler(nil);
     155}
     156
     157- (void)webView:(WKWebView *)webView contextMenuWillPresentForElement:(WKContextMenuElementInfo *)elementInfo
     158{
     159    willPresentCalled = true;
     160}
     161
     162@end
     163
     164TEST(ContextMenu, APIBeforeSPI)
     165{
     166    auto driver = contextMenuWebViewDriver([TestContextMenuAPIBeforeSPIUIDelegate class]);
     167    [driver begin:^(BOOL result) {
     168        EXPECT_TRUE(result);
     169        [driver clickDown];
     170        [driver clickUp];
     171    }];
     172    TestWebKitAPI::Util::run(&willPresentCalled);
     173    EXPECT_TRUE(contextMenuRequested);
     174    EXPECT_FALSE(contextMenuSPIRequested);
     175}
     176
    131177@interface TestContextMenuImageUIDelegate : NSObject <WKUIDelegate>
    132178@end
     
    164210@end
    165211
    166 TEST(WebKit, ContextMenuImage)
     212TEST(ContextMenu, Image)
    167213{
    168214    linkURL = [NSURL URLWithString:@"http://127.0.0.1/image"];
     
    232278@end
    233279
    234 TEST(WebKit, ContextMenuLegacy)
     280TEST(ContextMenu, Legacy)
    235281{
    236282    auto driver = contextMenuWebViewDriver([LegacyContextMenuUIDelegate class]);
     
    287333@end
    288334
    289 TEST(WebKit, ContextMenuSuggestedActions)
     335TEST(ContextMenu, SuggestedActions)
    290336{
    291337    auto driver = contextMenuWebViewDriver([TestContextMenuSuggestedActionsUIDelegate class]);
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm

    r248701 r252309  
    5050}
    5151   
    52 TEST(WebKit, RequestActivatedElementInfoForLink)
    53 {
    54     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
    55     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style = 'margin: 0px;'><a href='testURL.test' style='display: block; height: 100%;' title='HitTestLinkTitle' id='testID'></a></body></html>" baseURL:nil];
     52TEST(_WKActivatedElementInfo, InfoForLink)
     53{
     54    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     55    [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'><a href='testURL.test' style='display: block; height: 100%;' title='HitTestLinkTitle' id='testID'></a></body></html>" baseURL:nil];
    5656    [webView _test_waitForDidFinishNavigation];
    5757   
     
    7474    TestWebKitAPI::Util::run(&finished);
    7575}
    76    
    77 TEST(WebKit, RequestActivatedElementInfoForImage)
     76
     77TEST(_WKActivatedElementInfo, InfoForImage)
     78{
     79    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 215, 174)]);
     80    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"image" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
     81    [webView loadRequest:request];
     82    [webView _test_waitForDidFinishNavigation];
     83
     84    __block bool finished = false;
     85    [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
     86
     87        EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeImage);
     88        EXPECT_WK_STREQ(elementInfo.imageURL.lastPathComponent, "large-red-square.png");
     89        EXPECT_NOT_NULL(elementInfo.image);
     90
     91        finished = true;
     92    }];
     93
     94    TestWebKitAPI::Util::run(&finished);
     95}
     96
     97TEST(_WKActivatedElementInfo, InfoForMediaDocument)
    7898{
    7999    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 215, 174)]);
     
    99119}
    100120
    101 TEST(WebKit, RequestActivatedElementInfoForRotatedImage)
     121TEST(_WKActivatedElementInfo, InfoForLinkAroundImage)
     122{
     123    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     124    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"link-with-image" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
     125    [webView loadRequest:request];
     126    [webView _test_waitForDidFinishNavigation];
     127
     128    __block bool finished = false;
     129    [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
     130
     131        EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeLink);
     132        EXPECT_WK_STREQ(elementInfo.URL.lastPathComponent, "testURL.test");
     133        EXPECT_WK_STREQ(elementInfo.title, "HitTestImageTitle");
     134        EXPECT_WK_STREQ(elementInfo.ID, @"testID");
     135        EXPECT_NOT_NULL(elementInfo.image);
     136        EXPECT_EQ(elementInfo.boundingRect.size.width, 320);
     137        EXPECT_EQ(elementInfo.boundingRect.size.height, 500);
     138        EXPECT_EQ(elementInfo.image.size.width, 1668);
     139        EXPECT_EQ(elementInfo.image.size.height, 1668);
     140
     141        finished = true;
     142    }];
     143
     144    TestWebKitAPI::Util::run(&finished);
     145}
     146
     147
     148TEST(_WKActivatedElementInfo, InfoForRotatedImage)
    102149{
    103150    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
    104151    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"img-with-rotated-image" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
    105 
    106152    [webView loadRequest:request];
    107153    [webView _test_waitForDidFinishNavigation];
     
    156202}
    157203
    158 TEST(WebKit, RequestActivatedElementInfoForBlank)
    159 {
    160     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
    161     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style = 'margin: 0px;'></body></html>" baseURL:nil];
     204TEST(_WKActivatedElementInfo, InfoForBlank)
     205{
     206    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     207    [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'></body></html>" baseURL:nil];
    162208    [webView _test_waitForDidFinishNavigation];
    163209   
     
    175221}
    176222
    177 TEST(WebKit, RequestActivatedElementInfoForBrokenImage)
    178 {
    179     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
    180     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style = 'margin: 0px;'><img  src='missing.gif' height='100' width='100'></body></html>" baseURL:nil];
     223TEST(_WKActivatedElementInfo, InfoForBrokenImage)
     224{
     225    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     226    [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'><img  src='missing.gif' height='100' width='100'></body></html>" baseURL:nil];
    181227    [webView _test_waitForDidFinishNavigation];
    182228   
     
    194240}
    195241
    196 TEST(WebKit, RequestActivatedElementInfoForAttachment)
     242TEST(_WKActivatedElementInfo, InfoForAttachment)
    197243{
    198244    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     
    213259}
    214260
    215 TEST(WebKit, RequestActivatedElementInfoWithNestedSynchronousUpdates)
     261TEST(_WKActivatedElementInfo, InfoWithNestedSynchronousUpdates)
    216262{
    217263    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     
    237283}
    238284
    239 TEST(WebKit, RequestActivatedElementInfoWithNestedRequests)
     285TEST(_WKActivatedElementInfo, InfoWithNestedRequests)
    240286{
    241287    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
Note: See TracChangeset for help on using the changeset viewer.