Title: [252332] trunk/Tools
Revision
252332
Author
d...@apple.com
Date
2019-11-11 10:28:29 -0800 (Mon, 11 Nov 2019)

Log Message

Regression r252309: API Test TestWebKitAPI._WKActivatedElementInfo.InfoForLinkAroundImage is failing consistently
https://bugs.webkit.org/show_bug.cgi?id=204058
<rdar://problem/57056000>

Unreviewed.

Remove test that looks at screen dimensions, because it fails on iPad.

* TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (252331 => 252332)


--- trunk/Tools/ChangeLog	2019-11-11 18:06:45 UTC (rev 252331)
+++ trunk/Tools/ChangeLog	2019-11-11 18:28:29 UTC (rev 252332)
@@ -1,3 +1,16 @@
+2019-11-11  Dean Jackson  <d...@apple.com>
+
+        Regression r252309: API Test TestWebKitAPI._WKActivatedElementInfo.InfoForLinkAroundImage is failing consistently
+        https://bugs.webkit.org/show_bug.cgi?id=204058
+        <rdar://problem/57056000>
+
+        Unreviewed.
+
+        Remove test that looks at screen dimensions, because it fails on iPad.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
+        (TestWebKitAPI::TEST):
+
 2019-11-11  Aakash Jain  <aakash_j...@apple.com>
 
         [EWS] Use named arguments in factories.py

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm (252331 => 252332)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm	2019-11-11 18:06:45 UTC (rev 252331)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm	2019-11-11 18:28:29 UTC (rev 252332)
@@ -48,16 +48,16 @@
     EXPECT_EQ(CGRectGetMinY(expectedBoundingRect), CGRectGetMinY(observedBoundingRect));
     EXPECT_EQ(expectedType, elementInfo.type);
 }
-    
+
 TEST(_WKActivatedElementInfo, InfoForLink)
 {
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'><a href='' style='display: block; height: 100%;' title='HitTestLinkTitle' id='testID'></a></body></html>" baseURL:nil];
     [webView _test_waitForDidFinishNavigation];
-    
+
     __block bool finished = false;
     [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
-        
+
         EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeLink);
         EXPECT_WK_STREQ(elementInfo.URL.absoluteString, "testURL.test");
         EXPECT_WK_STREQ(elementInfo.title, "HitTestLinkTitle");
@@ -67,10 +67,10 @@
         EXPECT_EQ(elementInfo.boundingRect.size.height, 500);
         EXPECT_EQ(elementInfo.image.size.width, 320);
         EXPECT_EQ(elementInfo.image.size.height, 500);
-        
+
         finished = true;
     }];
-    
+
     TestWebKitAPI::Util::run(&finished);
 }
 
@@ -100,10 +100,10 @@
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"icon" withExtension:@"png" subdirectory:@"TestWebKitAPI.resources"]];
     [webView loadRequest:request];
     [webView _test_waitForDidFinishNavigation];
-    
+
     __block bool finished = false;
     [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
-        
+
         EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeImage);
         EXPECT_WK_STREQ(elementInfo.imageURL.lastPathComponent, "icon.png");
         EXPECT_NOT_NULL(elementInfo.image);
@@ -111,10 +111,10 @@
         EXPECT_EQ(elementInfo.boundingRect.size.height, 174);
         EXPECT_EQ(elementInfo.image.size.width, 215);
         EXPECT_EQ(elementInfo.image.size.height, 174);
-        
+
         finished = true;
     }];
-    
+
     TestWebKitAPI::Util::run(&finished);
 }
 
@@ -135,8 +135,6 @@
         EXPECT_NOT_NULL(elementInfo.image);
         EXPECT_EQ(elementInfo.boundingRect.size.width, 320);
         EXPECT_EQ(elementInfo.boundingRect.size.height, 500);
-        EXPECT_EQ(elementInfo.image.size.width, 1668);
-        EXPECT_EQ(elementInfo.image.size.height, 1668);
 
         finished = true;
     }];
@@ -206,17 +204,17 @@
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'></body></html>" baseURL:nil];
     [webView _test_waitForDidFinishNavigation];
-    
+
     __block bool finished = false;
     [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
-        
+
         EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeUnspecified);
         EXPECT_EQ(elementInfo.boundingRect.size.width, 320);
         EXPECT_EQ(elementInfo.boundingRect.size.height, 500);
-        
+
         finished = true;
     }];
-    
+
     TestWebKitAPI::Util::run(&finished);
 }
 
@@ -225,17 +223,17 @@
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
     [webView loadHTMLString:@"<html><head><meta name='viewport' content='initial-scale=1'></head><body style='margin: 0px;'><img  src='' height='100' width='100'></body></html>" baseURL:nil];
     [webView _test_waitForDidFinishNavigation];
-    
+
     __block bool finished = false;
     [webView _requestActivatedElementAtPosition:CGPointMake(50, 50) completionBlock: ^(_WKActivatedElementInfo *elementInfo) {
-        
+
         EXPECT_TRUE(elementInfo.type == _WKActivatedElementTypeUnspecified);
         EXPECT_EQ(elementInfo.boundingRect.size.width, 100);
         EXPECT_EQ(elementInfo.boundingRect.size.height, 100);
-        
+
         finished = true;
     }];
-    
+
     TestWebKitAPI::Util::run(&finished);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to