http2: Update priorities of pushed streams
On receiving a PUSH_PROMISED, the pushed stream is assigned an IDLE
priority because it is "speculative". When the pushed stream matches
an actual request, the stream's priority is updated to match that of
the request.
In addition to unit tests, I tested this against a local HTTP/2 server
that served the following page:
<html><body>
<script type="application/javascript" src="/a.js"></script>
<script type="application/javascript" src="/b.js"></script>
<script type="application/javascript" src="/c.js"></script>
</body></html>
The server was configured to push "/b.js" when serving the HTML. I verified
that the server's priority tree went through the following sequence:
1. {html -> b.js}, after receiving the PUSH_PROMISE
2. {html -> a.js -> b.js}, after the preload scanner finds a.js
3. {html -> a.js -> b.js}, after the preload scanner finds b.js
4. {html -> a.js -> b.js -> c.js}, after the preload scanner finds c.js
Before this change, the final priority tree would have been:
{html -> {b.js, {a.js -> c.js}}}
BUG=668298
[email protected],[email protected]
Review-Url: https://codereview.chromium.org/2596703002
Cr-Commit-Position: refs/heads/master@{#442770}
17 files changed