Auto merge of #8314 - jdm:timeoutinvestigations, r=metajack

Investigations for #7787

I'm just going to keep throwing stuff at try, because running directly on the builders isn't yielding results.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8314)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-05 04:08:30 +05:30
commit c78da15abb
3 changed files with 93 additions and 26 deletions

View file

@ -23,6 +23,8 @@ use url::{self, Url};
/// Global flags for Servo, currently set on the command line.
#[derive(Clone)]
pub struct Opts {
pub is_running_problem_test: bool,
/// The initial URL to load.
pub url: Option<Url>,
@ -397,6 +399,7 @@ const DEFAULT_USER_AGENT: UserAgent = UserAgent::Desktop;
pub fn default_opts() -> Opts {
Opts {
is_running_problem_test: false,
url: Some(Url::parse("about:blank").unwrap()),
paint_threads: 1,
gpu_painting: false,
@ -518,6 +521,15 @@ pub fn from_cmdline_args(args: &[String]) {
} else {
homepage_pref.as_string()
};
let is_running_problem_test =
url_opt
.as_ref()
.map(|url|
url.starts_with("http://web-platform.test:8000/2dcontext/drawing-images-to-the-canvas/") ||
url.starts_with("http://web-platform.test:8000/_mozilla/mozilla/canvas/") ||
url.starts_with("http://web-platform.test:8000/_mozilla/css/canvas_over_area.html"))
.unwrap_or(false);
let url = match url_opt {
Some(url_string) => {
parse_url_or_filename(&cwd, url_string)
@ -605,6 +617,7 @@ pub fn from_cmdline_args(args: &[String]) {
}).collect();
let opts = Opts {
is_running_problem_test: is_running_problem_test,
url: Some(url),
paint_threads: paint_threads,
gpu_painting: gpu_painting,