Add a pref for a default homepage.

This commit is contained in:
James Graham 2015-09-17 00:50:50 +01:00
parent 79e548905e
commit 8d9ab50a96
5 changed files with 46 additions and 15 deletions

15
tests/reftest.rs vendored
View file

@ -25,6 +25,7 @@ use std::io::{self, Read, Result};
use std::path::{Path, PathBuf};
use std::process;
use std::process::{Command, Stdio};
use std::thread::sleep_ms;
use test::run_tests_console;
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn, ShouldPanic};
use url::Url;
@ -111,10 +112,22 @@ fn run(test_opts: TestOpts, all_tests: Vec<TestDescAndFn>,
// Verify that we're passing in valid servo arguments. Otherwise, servo
// will exit before we've run any tests, and it will appear to us as if
// all the tests are failing.
let output = match Command::new(&servo_path()).args(&servo_args).output() {
let mut command = Command::new(&servo_path());
command
.args(&servo_args)
.arg("-z")
.arg("about:blank");
let mut child = match command.spawn() {
Ok(p) => p,
Err(e) => panic!("failed to execute process: {}", e),
};
// Wait for the shell to launch or to fail
sleep_ms(1000);
child.kill().unwrap();
let output = try!(child.wait_with_output());
let stderr = String::from_utf8(output.stderr).unwrap();
if stderr.contains("Unrecognized") {