Changeset 251175 in webkit


Ignore:
Timestamp:
Oct 15, 2019 7:06:01 PM (5 years ago)
Author:
Wenson Hsieh
Message:

editing/async-clipboard/clipboard-item-basic.html is a flaky failure on macOS and iOS
https://bugs.webkit.org/show_bug.cgi?id=203015

Reviewed by Tim Horton.

This test, for the most part, finishes and dumps its final output before a couple of (intentionally) rejected
promises finish and log their uncaught rejections to the console. In the case where we lose this race and the
console messages happen earlier, we end up with a text diff failure.

Avoid this issue by making sure that we catch these promise rejections.

  • editing/async-clipboard/clipboard-item-basic.html:

Also give this test a tiny bit more variety, by making one of the promises reject immediately, while the other
still waits for a short delay (50 ms).

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r251163 r251175  
     12019-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        editing/async-clipboard/clipboard-item-basic.html is a flaky failure on macOS and iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=203015
     5
     6        Reviewed by Tim Horton.
     7
     8        This test, for the most part, finishes and dumps its final output before a couple of (intentionally) rejected
     9        promises finish and log their uncaught rejections to the console. In the case where we lose this race and the
     10        console messages happen earlier, we end up with a text diff failure.
     11
     12        Avoid this issue by making sure that we catch these promise rejections.
     13
     14        * editing/async-clipboard/clipboard-item-basic.html:
     15
     16        Also give this test a tiny bit more variety, by making one of the promises reject immediately, while the other
     17        still waits for a short delay (50 ms).
     18
    1192019-10-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    220
  • trunk/LayoutTests/editing/async-clipboard/clipboard-item-basic.html

    r251149 r251175  
    144144                item = tryToCreateClipboardItem({
    145145                    "text/plain" : Promise.resolve("謝謝"),
    146                     "text/html" : new Promise((_, reject) => setTimeout(() => reject(imageBlob()), 50)),
    147                     "image/png" : new Promise((_, reject) => setTimeout(() => reject(imageBlob()), 50)),
     146                    "text/html" : new Promise((_, reject) => {
     147                        setTimeout(reject, 50);
     148                    }).catch(() => { }),
     149                    "image/png" : Promise.reject(imageBlob()).catch(() => { }),
    148150                    "🤔🤔🤔" : Promise.resolve("מקור השם עברית"),
    149151                    "מקור השם עברית" : Promise.resolve("🤔🤔🤔")
Note: See TracChangeset for help on using the changeset viewer.