Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using fetch for the HTTP unit tests. #14114

Merged
merged 4 commits into from Nov 8, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Simplify string handling in make_server.

  • Loading branch information
Ms2ger committed Nov 7, 2016
commit 184adb7495c6e6ebe062b88190ae563e1392bb86
@@ -85,9 +85,7 @@ fn fetch_sync(request: Request, dc: Option<Sender<DevtoolsControlMsg>>) -> Respo
fn make_server<H: Handler + 'static>(handler: H) -> (Listening, Url) {
// this is a Listening server because of handle_threads()
let server = Server::http("0.0.0.0:0").unwrap().handle_threads(handler, 1).unwrap();
let port = server.socket.port().to_string();
let mut url_string = "http://localhost:".to_owned();
url_string.push_str(&port);
let url_string = format!("http://localhost:{}", server.socket.port());
let url = Url::parse(&url_string).unwrap();
(server, url)
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.