Changeset 244150 in webkit


Ignore:
Timestamp:
Apr 10, 2019 2:16:42 PM (5 years ago)
Author:
youenn@apple.com
Message:

Layout Test http/wpt/fetch/response-opaque-clone.html is sometimes timing out on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=194525
<rdar://problem/48012229>

Reviewed by Alex Christensen.

Test is no longer flaky on MacOS.
As per flakiness dashboard, it sometimes times out on iOS simulator.
It sometimes passes after running for 20 seconds.
Mark it as Slow and improve the test to output more sub-tests.
Removed unnecessary removal of cache since test runner will clear them at the end of the test.

  • http/wpt/fetch/response-opaque-clone-expected.txt:
  • http/wpt/fetch/response-opaque-clone.html:
  • platform/ios-simulator-wk2/TestExpectations:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244147 r244150  
     12019-04-10  Youenn Fablet  <youenn@apple.com>
     2
     3        Layout Test http/wpt/fetch/response-opaque-clone.html is sometimes timing out on iOS simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=194525
     5        <rdar://problem/48012229>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Test is no longer flaky on MacOS.
     10        As per flakiness dashboard, it sometimes times out on iOS simulator.
     11        It sometimes passes after running for 20 seconds.
     12        Mark it as Slow and improve the test to output more sub-tests.
     13        Removed unnecessary removal of cache since test runner will clear them at the end of the test.
     14
     15        * http/wpt/fetch/response-opaque-clone-expected.txt:
     16        * http/wpt/fetch/response-opaque-clone.html:
     17        * platform/ios-simulator-wk2/TestExpectations:
     18
    1192019-04-10  Justin Fan  <justin_fan@apple.com>
    220
  • trunk/LayoutTests/http/wpt/fetch/response-opaque-clone-expected.txt

    r227339 r244150  
    11
    22PASS Check opaque response can be cloned and cached correctly
     3PASS fetched response
     4PASS cloned response
     5PASS cached response
    36
  • trunk/LayoutTests/http/wpt/fetch/response-opaque-clone.html

    r240158 r244150  
    1212    <script>
    1313
    14 function testResponseOpacity(response, test, testName)
     14function testResponseOpacity(response, testName)
    1515{
    16     assert_equals(response.type, "opaque", testName + " type");
    17     assert_equals(response.status, 0, testName + " status");
    18     assert_equals(response.statusText, "", testName + " statusText");
    19     assert_equals(response.url, "", testName + " url");
    20     assert_false(response.redirected, testName + " redirected");
    21     assert_true(response.headers.values().next().done, testName + " headers");
    22     assert_equals(response.body, null, testName + " opaque response body should be null");
     16    test(() => {
     17        assert_equals(response.type, "opaque", testName + " type");
     18        assert_equals(response.status, 0, testName + " status");
     19        assert_equals(response.statusText, "", testName + " statusText");
     20        assert_equals(response.url, "", testName + " url");
     21        assert_false(response.redirected, testName + " redirected");
     22        assert_true(response.headers.values().next().done, testName + " headers");
     23        assert_equals(response.body, null, testName + " opaque response body should be null");
     24    }, testName);
    2325}
    24 promise_test(async function(test) {
     26
     27promise_test(async function() {
    2528    var request = new Request(get_host_info().HTTP_REMOTE_ORIGIN, { mode: "no-cors" });
    2629    var response = await fetch(request);
    2730
    28     testResponseOpacity(response, test, "fetched response");
     31    testResponseOpacity(response, "fetched response");
    2932
    3033    var clone = response.clone();
    3134
    32     testResponseOpacity(clone, test, "cloned response");
     35    testResponseOpacity(clone, "cloned response");
    3336    var buffer = await clone.arrayBuffer();
    3437    assert_equals(buffer.byteLength, 0, "cloned opaque response buffer should be null");
    3538
    3639    // WK1 does not support Cache API yet.
    37     if (!self.caches)
     40    if (!self.caches) {
     41        test(() => {
     42        }, "cached response");
    3843        return;
     44    }
    3945
    4046    var cache = await self.caches.open("test");
     
    4248    var cached = await cache.match(request.url);
    4349
    44     testResponseOpacity(cached, test,  "cached response")
     50    testResponseOpacity(cached, "cached response")
    4551    buffer = await cached.arrayBuffer();
    4652    assert_equals(buffer.byteLength, 0, "cached opaque response buffer should be null");
    4753
    48     await self.caches.delete("test");
    4954}, "Check opaque response can be cloned and cached correctly");
    5055    </script>
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r244047 r244150  
    7979
    8080webkit.org/b/196358 http/wpt/cache-storage/quota-third-party.https.html [ Pass Failure ]
     81http/wpt/fetch/response-opaque-clone.html [ Slow ]
    8182
    8283webkit.org/b/196376 [ Debug ] storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]
Note: See TracChangeset for help on using the changeset viewer.