Title: [235504] trunk/Tools
- Revision
- 235504
- Author
- wenson_hs...@apple.com
- Date
- 2018-08-30 07:35:27 -0700 (Thu, 30 Aug 2018)
Log Message
[iOS] TestWebKitAPI.PasteImage tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=185965
Reviewed by Andy Estes.
These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
this by waiting for the "load" event (which is also done in some of the other tests in this file).
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (235503 => 235504)
--- trunk/Tools/ChangeLog 2018-08-30 14:32:29 UTC (rev 235503)
+++ trunk/Tools/ChangeLog 2018-08-30 14:35:27 UTC (rev 235504)
@@ -1,3 +1,18 @@
+2018-08-30 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [iOS] TestWebKitAPI.PasteImage tests are flaky failures
+ https://bugs.webkit.org/show_bug.cgi?id=185965
+
+ Reviewed by Andy Estes.
+
+ These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
+ element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
+ because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
+ this by waiting for the "load" event (which is also done in some of the other tests in this file).
+
+ * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
+ (TEST):
+
2018-08-30 Michael Catanzaro <mcatanz...@igalia.com>
Unreviewed, rolling out r235114.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm (235503 => 235504)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm 2018-08-30 14:32:29 UTC (rev 235503)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm 2018-08-30 14:35:27 UTC (rev 235504)
@@ -67,6 +67,7 @@
EXPECT_WK_STREQ("true", [webView stringByEvaluatingJavaScript:@"dataTransfer.files.includes(gifItem.file).toString()"]);
[webView stringByEvaluatingJavaScript:@"insertFileAsImage(gifItem.file)"];
+ [webView waitForMessage:@"loaded"];
EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = "" URL(imageElement.src); url.protocol"]);
EXPECT_WK_STREQ("400", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
}
@@ -89,6 +90,7 @@
EXPECT_WK_STREQ("true", [webView stringByEvaluatingJavaScript:@"dataTransfer.files.includes(jpegItem.file).toString()"]);
[webView stringByEvaluatingJavaScript:@"insertFileAsImage(jpegItem.file)"];
+ [webView waitForMessage:@"loaded"];
EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = "" URL(imageElement.src); url.protocol"]);
EXPECT_WK_STREQ("600", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
}
@@ -111,6 +113,7 @@
EXPECT_WK_STREQ("true", [webView stringByEvaluatingJavaScript:@"dataTransfer.files.includes(pngItem.file).toString()"]);
[webView stringByEvaluatingJavaScript:@"insertFileAsImage(pngItem.file)"];
+ [webView waitForMessage:@"loaded"];
EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = "" URL(imageElement.src); url.protocol"]);
EXPECT_WK_STREQ("200", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes