Ensure we get the post-redirect url

This commit is contained in:
James Graham 2015-07-19 20:40:55 +01:00
parent 2a701cc339
commit f44470ef52
6 changed files with 14 additions and 7 deletions

View file

@ -206,10 +206,10 @@ impl Handler {
let (sender, receiver) = ipc::channel().unwrap();
let ConstellationChan(ref const_chan) = self.constellation_chan;
let cmd_msg = WebDriverCommandMsg::GetUrl(pipeline_id, sender);
let cmd_msg = WebDriverCommandMsg::ScriptCommand(pipeline_id,
WebDriverScriptCommand::GetUrl(sender));
const_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
//Wait to get a load event
let url = receiver.recv().unwrap();
Ok(WebDriverResponse::Generic(ValueResponse::new(url.serialize().to_json())))