Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWrite a test for #11223 #11566
Write a test for #11223 #11566
Comments
|
I might get to do it this weekend, but if someone steps in I'd be glad to help him. Thanks for writing this, didn't know wpt allowed that kind of things. |
|
I'm doing it right now, and the presence of some flags we use for testing, like Also, in the following wpt-test (being <!doctype html>
<meta charset="utf-8">
<title>Early script query in an iframe does not deadlock</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- This is a test for servo/servo#11223. Note that 82 is the number of bytes until the end of the <script> tag -->
<iframe id="frame" src="resources/iframe_query_inner.html?pipe=trickle(82:d2)"></iframe>
<iframe id="frame2" src="http://localhost:5000"></iframe>
<div>test</div>
<script>
async_test(function(t) {
document.getElementById("frame").onload = function() {
t.done();
}
}, "Iframe that does an early query when te viewport is not yet present should not deadlock");
</script>resources/iframe_query_inner.html: <!doctype html><script>console.log(document.documentElement.offsetHeight)</script><div>test</div>Changing the event listener target, or the order of the iframes don't seem to make an effect, but they should be strictly equivalent otherwise. So... I'll try to check if any headers wpt could be sending would make a difference, but otherwise I'm running out of ideas (modulo reverse-engineering wptrunner and see what happens). Also, I'm not sure if we can not-specify the |
|
I do not believe there is a way to inhibit the stylesheet flag. I wonder if we should restrict it to only be added for reference tests? We could at least the theory by removing http://mxr.mozilla.org/servo/source/tests/wpt/harness/wptrunner/executors/executorservo.py#75 . |
|
I ran out of ideas on how to reproduce it... Below are the http headers for the three attempts. The trickle one really differs, and the # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from time import sleep
def write_chunk(response, chunk):
line = [
"%x\r\n" % len(chunk),
chunk,
"\r\n"]
response.writer.write("".join(line))
def main(request, response):
chunks = [
"<!doctype html><script>console.log(document.documentElement.offsetHeight)</script>",
"<div>Test</div>"
];
response.headers.set("Content-Type", "text/html");
response.headers.set("Transfer-Encoding", "chunked");
response.headers.set("Connection", "keep-alive");
response.write_status_headers()
write_chunk(response, chunks[0]);
sleep(2);
write_chunk(response, chunks[1]);
response.writer.write("0\r\n\r\n")
When creating different iframes for each, only the node server deadlocks, and the others run fine... My guess is there are some internal differences between how wpt python handlers and node works, but I haven't investigated further... |
We should be able to write a test based on #11223 (comment), since WPT supports delaying and chunking responses in well-defined ways: http://wptserve.readthedocs.io/en/latest/pipes.html#trickle
cc @emilio