Changeset 235504 in webkit


Ignore:
Timestamp:
Aug 30, 2018 7:35:27 AM (6 years ago)
Author:
Wenson Hsieh
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r235500 r235504  
     12018-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] TestWebKitAPI.PasteImage tests are flaky failures
     4        https://bugs.webkit.org/show_bug.cgi?id=185965
     5
     6        Reviewed by Andy Estes.
     7
     8        These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
     9        element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
     10        because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
     11        this by waiting for the "load" event (which is also done in some of the other tests in this file).
     12
     13        * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
     14        (TEST):
     15
    1162018-08-30  Michael Catanzaro  <mcatanzaro@igalia.com>
    217
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm

    r228340 r235504  
    6868
    6969    [webView stringByEvaluatingJavaScript:@"insertFileAsImage(gifItem.file)"];
     70    [webView waitForMessage:@"loaded"];
    7071    EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = new URL(imageElement.src); url.protocol"]);
    7172    EXPECT_WK_STREQ("400", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
     
    9091
    9192    [webView stringByEvaluatingJavaScript:@"insertFileAsImage(jpegItem.file)"];
     93    [webView waitForMessage:@"loaded"];
    9294    EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = new URL(imageElement.src); url.protocol"]);
    9395    EXPECT_WK_STREQ("600", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
     
    112114
    113115    [webView stringByEvaluatingJavaScript:@"insertFileAsImage(pngItem.file)"];
     116    [webView waitForMessage:@"loaded"];
    114117    EXPECT_WK_STREQ("blob:", [webView stringByEvaluatingJavaScript:@"url = new URL(imageElement.src); url.protocol"]);
    115118    EXPECT_WK_STREQ("200", [webView stringByEvaluatingJavaScript:@"imageElement.width"]);
Note: See TracChangeset for help on using the changeset viewer.