Revision 03598e505d3e3cd46ce992b3d6f358791125b04f authored by Ben Wells on 27 March 2018, 05:42:26 UTC, committed by Chromium WPT Sync on 27 March 2018, 05:42:26 UTC
This reverts commit aeecb4f32ece14a8a294e4f9b80a5bb2278091c9.

Reason for revert: Causing lots of failures on webkit bots, e.g.:
https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Linux%20Trusty/42143

Original change's description:
> Don't adjust the NavigationTimings on redirects
>
> We adjust the timings in WebDocumentLoaderImpl::UpdateNavigation(),
> shouldn't update in each AddRedirect() (which is called in a batch
> way after all the redirects are handled in the browser process with PlzNavigate,
> adjusting timings there with current timestamp is totally wrong)
>
> R=​ksakamoto,arthursonzogni
>
> Bug: 813889
> Change-Id: I3a57d3fdf1833c300feb5ee61737b64cece0946b
> Reviewed-on: https://chromium-review.googlesource.com/974673
> Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#546001}

TBR=kinuko@chromium.org,ksakamoto@chromium.org,arthursonzogni@chromium.org

Change-Id: I467ed888084ea0eda06faa903d1797fabffc47da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 813889
Reviewed-on: https://chromium-review.googlesource.com/981912
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Ben Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546025}
1 parent 8ec345b
Raw File
late-upload-events.htm
<!DOCTYPE html>
<meta charset=utf-8>
<title>Adding upload event listeners after send()</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js?pipe=sub></script>

<h1>Adding upload event listeners after send()</h1>

<div id=log></div>

<script>
function doTest(desc, headers) {
    async_test("Late listeners: " + desc).step(function() {
        var client = new XMLHttpRequest();
        var eventCounter = 0;
        client.open("POST", CROSSDOMAIN + "resources/status.py?headers=custom-header");

        for (var name in headers) {
            client.setRequestHeader(name, headers[name]);
        }

        client.onreadystatechange = this.step_func(function(e) {
            // Irrelevant if request is not finished
            if (client.readyState < 4) return;
            assert_equals(client.status, 200);
            assert_equals(eventCounter, 0, 'Events fired, but should not have');
            this.done();
        });
        client.send((new Array(3000)).join('xo'));
        client.upload.onprogress = client.upload.onloadend = client.upload.onloadstart = client.upload.onload = this.step_func(function(e) {
            eventCounter++;
            assert_unreached("Upload events should not fire, but did: " + e.type);
        });
    });
}

doTest("No preflight", {});
doTest("Preflight", {"custom-header":"test"});
</script>
back to top