Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.

This commit is contained in:
Simon Sapin 2015-04-23 00:14:02 +02:00 committed by Josh Matthews
parent 7b87085c18
commit ef8edd4e87
168 changed files with 2247 additions and 2408 deletions

View file

@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(collections, exit_status, fs_walk, io, old_io, path, path_ext, std_misc, test)]
#![feature(collections, exit_status, fs_walk, io, path, path_ext, slice_patterns, std_misc, test)]
#[macro_use] extern crate bitflags;
extern crate png;
extern crate test;
@ -16,8 +16,7 @@ extern crate url;
use std::env;
use std::ffi::OsStr;
use std::fs::{PathExt, File, walk_dir};
use std::io::Read;
use std::old_io::{Reader, IoResult};
use std::io::{self, Read, Result};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::thunk::Thunk;
@ -72,7 +71,7 @@ fn main() {
let maybe_extension = file.extension();
match maybe_extension {
Some(extension) => {
if extension == OsStr::from_str("list") && file.is_file() {
if extension == OsStr::new("list") && file.is_file() {
let mut tests = parse_lists(&file, servo_args, render_mode, all_tests.len());
println!("\t{} [{} tests]", file.display(), tests.len());
all_tests.append(&mut tests);
@ -102,7 +101,7 @@ fn main() {
}
fn run(test_opts: TestOpts, all_tests: Vec<TestDescAndFn>,
servo_args: Vec<String>) -> IoResult<bool> {
servo_args: Vec<String>) -> io::Result<bool> {
// 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.
@ -238,7 +237,7 @@ fn make_test(reftest: Reftest) -> TestDescAndFn {
ignore: false,
should_panic: ShouldPanic::No,
},
testfn: DynTestFn(Thunk::new(move || {
testfn: DynTestFn(Box::new(move || {
check_reftest(reftest);
})),
}

View file

@ -2,7 +2,7 @@
* 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/. */
extern crate "cookie" as cookie_rs;
extern crate cookie as cookie_rs;
use net::cookie::Cookie;
use net::cookie_storage::CookieStorage;

View file

@ -2,7 +2,7 @@
* 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/. */
#![cfg_attr(test, feature(net, alloc, path, io))]
#![cfg_attr(test, feature(alloc))]
extern crate net;
extern crate net_traits;

View file

@ -23,7 +23,7 @@ fn read_file(path: &path::Path) -> io::Result<Vec<u8>> {
fn test_sniff_mp4_matcher() {
let matcher = Mp4Matcher;
let p = PathBuf::new("parsable_mime/video/mp4/test.mp4");
let p = PathBuf::from("parsable_mime/video/mp4/test.mp4");
let read_result = read_file(&p);
match read_result {
@ -43,7 +43,7 @@ fn test_sniff_full(filename_orig: &path::Path,type_string: &str,subtype_string:
let current_working_directory = env::current_dir().unwrap();
println!("The current directory is {}", current_working_directory.display());
let mut filename = PathBuf::new("parsable_mime/");
let mut filename = PathBuf::from("parsable_mime/");
filename.push(filename_orig);
let classifier = MIMEClassifier::new();
@ -73,7 +73,7 @@ fn test_sniff_full(filename_orig: &path::Path,type_string: &str,subtype_string:
#[cfg(test)]
fn test_sniff_classification(file: &str,type_string: &str,subtype_string: &str,
supplied_type: Option<(&'static str,&'static str)>){
let mut x = PathBuf::new("./");
let mut x = PathBuf::from("./");
x.push(type_string);
x.push(subtype_string);
x.push(file);
@ -181,19 +181,19 @@ fn test_sniff_vsn_ms_fontobject() {
#[test]
#[should_panic]
fn test_sniff_true_type() {
test_sniff_full(&PathBuf::new("unknown/true_type.ttf"), "(TrueType)", "", None);
test_sniff_full(&PathBuf::from("unknown/true_type.ttf"), "(TrueType)", "", None);
}
#[test]
#[should_panic]
fn test_sniff_open_type() {
test_sniff_full(&PathBuf::new("unknown/open_type"), "(OpenType)", "", None);
test_sniff_full(&PathBuf::from("unknown/open_type"), "(OpenType)", "", None);
}
#[test]
#[should_panic]
fn test_sniff_true_type_collection() {
test_sniff_full(&PathBuf::new("unknown/true_type_collection.ttc"), "(TrueType Collection)", "", None);
test_sniff_full(&PathBuf::from("unknown/true_type_collection.ttc"), "(TrueType Collection)", "", None);
}
#[test]
@ -435,10 +435,10 @@ fn test_sniff_utf_8_bom() {
#[test]
fn test_sniff_rss_feed() {
test_sniff_full(&PathBuf::new("text/xml/feed.rss"), "application", "rss+xml", Some(("text", "html")));
test_sniff_full(&PathBuf::from("text/xml/feed.rss"), "application", "rss+xml", Some(("text", "html")));
}
#[test]
fn test_sniff_atom_feed() {
test_sniff_full(&PathBuf::new("text/xml/feed.atom"), "application", "atom+xml", Some(("text", "html")));
test_sniff_full(&PathBuf::from("text/xml/feed.atom"), "application", "atom+xml", Some(("text", "html")));
}

View file

@ -167,7 +167,7 @@ fn test_replace_hosts() {
//Start the TCP server
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let port = listener.socket_addr().unwrap().port();
let port = listener.local_addr().unwrap().port();
//Start the resource task and make a request to our TCP server
let resource_task = new_resource_task(None);

View file

@ -26,8 +26,6 @@ git = "https://github.com/servo/rust-geom"
[dependencies.selectors]
git = "https://github.com/servo/rust-selectors"
[dependencies.cssparser]
git = "https://github.com/servo/rust-cssparser"
[dependencies]
url = "*"
cssparser = "0.3.1"

View file

@ -35,12 +35,12 @@ fn test_match<T: PartialEq>(b: &T, a: Option<&T>) -> bool {
#[test]
fn should_find_all_elements() {
let arr_odd = [1u32, 2, 4, 6, 7, 8, 9];
let arr_even = [1u32, 2, 5, 6, 7, 8, 9, 42];
let arr_double = [1u32, 1, 2, 2, 6, 8, 22];
let arr_one = [234986325u32];
let arr_two = [3044u32, 8393];
let arr_three = [12u32, 23, 34];
let arr_odd = [1_i32, 2, 4, 6, 7, 8, 9];
let arr_even = [1_i32, 2, 5, 6, 7, 8, 9, 42];
let arr_double = [1_i32, 1, 2, 2, 6, 8, 22];
let arr_one = [234986325_i32];
let arr_two = [3044_i32, 8393];
let arr_three = [12_i32, 23, 34];
test_find_all_elems(&arr_odd);
test_find_all_elems(&arr_even);
@ -52,12 +52,12 @@ fn should_find_all_elements() {
#[test]
fn should_not_find_missing_elements() {
let arr_odd = [1u32, 2, 4, 6, 7, 8, 9];
let arr_even = [1u32, 2, 5, 6, 7, 8, 9, 42];
let arr_double = [1u32, 1, 2, 2, 6, 8, 22];
let arr_one = [234986325u32];
let arr_two = [3044u32, 8393];
let arr_three = [12u32, 23, 34];
let arr_odd = [1_i32, 2, 4, 6, 7, 8, 9];
let arr_even = [1_i32, 2, 5, 6, 7, 8, 9, 42];
let arr_double = [1_i32, 1, 2, 2, 6, 8, 22];
let arr_one = [234986325_i32];
let arr_two = [3044_i32, 8393];
let arr_three = [12_i32, 23, 34];
test_miss_all_elems(&arr_odd, &[-22, 0, 3, 5, 34938, 10, 11, 12]);
test_miss_all_elems(&arr_even, &[-1, 0, 3, 34938, 10, 11, 12]);

View file

@ -1,5 +0,0 @@
[api-replacement-encodings.html]
type: testharness
[Label for "replacement" should be rejected by API: hz-gb-2312]
expected: FAIL

View file

@ -1,530 +0,0 @@
[textdecoder-labels.html]
type: testharness
["chinese" => "gbk"]
expected: FAIL
[" chinese" => "gbk"]
expected: FAIL
["chinese " => "gbk"]
expected: FAIL
[" chinese " => "gbk"]
expected: FAIL
["\\tchinese" => "gbk"]
expected: FAIL
["chinese\\t" => "gbk"]
expected: FAIL
["\\tchinese\\t" => "gbk"]
expected: FAIL
["\\nchinese" => "gbk"]
expected: FAIL
["chinese\\n" => "gbk"]
expected: FAIL
["\\nchinese\\n" => "gbk"]
expected: FAIL
["\\fchinese" => "gbk"]
expected: FAIL
["chinese\\f" => "gbk"]
expected: FAIL
["\\fchinese\\f" => "gbk"]
expected: FAIL
["\\rchinese" => "gbk"]
expected: FAIL
["chinese\\r" => "gbk"]
expected: FAIL
["\\rchinese\\r" => "gbk"]
expected: FAIL
["csgb2312" => "gbk"]
expected: FAIL
[" csgb2312" => "gbk"]
expected: FAIL
["csgb2312 " => "gbk"]
expected: FAIL
[" csgb2312 " => "gbk"]
expected: FAIL
["\\tcsgb2312" => "gbk"]
expected: FAIL
["csgb2312\\t" => "gbk"]
expected: FAIL
["\\tcsgb2312\\t" => "gbk"]
expected: FAIL
["\\ncsgb2312" => "gbk"]
expected: FAIL
["csgb2312\\n" => "gbk"]
expected: FAIL
["\\ncsgb2312\\n" => "gbk"]
expected: FAIL
["\\fcsgb2312" => "gbk"]
expected: FAIL
["csgb2312\\f" => "gbk"]
expected: FAIL
["\\fcsgb2312\\f" => "gbk"]
expected: FAIL
["\\rcsgb2312" => "gbk"]
expected: FAIL
["csgb2312\\r" => "gbk"]
expected: FAIL
["\\rcsgb2312\\r" => "gbk"]
expected: FAIL
["csiso58gb231280" => "gbk"]
expected: FAIL
[" csiso58gb231280" => "gbk"]
expected: FAIL
["csiso58gb231280 " => "gbk"]
expected: FAIL
[" csiso58gb231280 " => "gbk"]
expected: FAIL
["\\tcsiso58gb231280" => "gbk"]
expected: FAIL
["csiso58gb231280\\t" => "gbk"]
expected: FAIL
["\\tcsiso58gb231280\\t" => "gbk"]
expected: FAIL
["\\ncsiso58gb231280" => "gbk"]
expected: FAIL
["csiso58gb231280\\n" => "gbk"]
expected: FAIL
["\\ncsiso58gb231280\\n" => "gbk"]
expected: FAIL
["\\fcsiso58gb231280" => "gbk"]
expected: FAIL
["csiso58gb231280\\f" => "gbk"]
expected: FAIL
["\\fcsiso58gb231280\\f" => "gbk"]
expected: FAIL
["\\rcsiso58gb231280" => "gbk"]
expected: FAIL
["csiso58gb231280\\r" => "gbk"]
expected: FAIL
["\\rcsiso58gb231280\\r" => "gbk"]
expected: FAIL
["gb2312" => "gbk"]
expected: FAIL
[" gb2312" => "gbk"]
expected: FAIL
["gb2312 " => "gbk"]
expected: FAIL
[" gb2312 " => "gbk"]
expected: FAIL
["\\tgb2312" => "gbk"]
expected: FAIL
["gb2312\\t" => "gbk"]
expected: FAIL
["\\tgb2312\\t" => "gbk"]
expected: FAIL
["\\ngb2312" => "gbk"]
expected: FAIL
["gb2312\\n" => "gbk"]
expected: FAIL
["\\ngb2312\\n" => "gbk"]
expected: FAIL
["\\fgb2312" => "gbk"]
expected: FAIL
["gb2312\\f" => "gbk"]
expected: FAIL
["\\fgb2312\\f" => "gbk"]
expected: FAIL
["\\rgb2312" => "gbk"]
expected: FAIL
["gb2312\\r" => "gbk"]
expected: FAIL
["\\rgb2312\\r" => "gbk"]
expected: FAIL
["gb_2312" => "gbk"]
expected: FAIL
[" gb_2312" => "gbk"]
expected: FAIL
["gb_2312 " => "gbk"]
expected: FAIL
[" gb_2312 " => "gbk"]
expected: FAIL
["\\tgb_2312" => "gbk"]
expected: FAIL
["gb_2312\\t" => "gbk"]
expected: FAIL
["\\tgb_2312\\t" => "gbk"]
expected: FAIL
["\\ngb_2312" => "gbk"]
expected: FAIL
["gb_2312\\n" => "gbk"]
expected: FAIL
["\\ngb_2312\\n" => "gbk"]
expected: FAIL
["\\fgb_2312" => "gbk"]
expected: FAIL
["gb_2312\\f" => "gbk"]
expected: FAIL
["\\fgb_2312\\f" => "gbk"]
expected: FAIL
["\\rgb_2312" => "gbk"]
expected: FAIL
["gb_2312\\r" => "gbk"]
expected: FAIL
["\\rgb_2312\\r" => "gbk"]
expected: FAIL
["gb_2312-80" => "gbk"]
expected: FAIL
[" gb_2312-80" => "gbk"]
expected: FAIL
["gb_2312-80 " => "gbk"]
expected: FAIL
[" gb_2312-80 " => "gbk"]
expected: FAIL
["\\tgb_2312-80" => "gbk"]
expected: FAIL
["gb_2312-80\\t" => "gbk"]
expected: FAIL
["\\tgb_2312-80\\t" => "gbk"]
expected: FAIL
["\\ngb_2312-80" => "gbk"]
expected: FAIL
["gb_2312-80\\n" => "gbk"]
expected: FAIL
["\\ngb_2312-80\\n" => "gbk"]
expected: FAIL
["\\fgb_2312-80" => "gbk"]
expected: FAIL
["gb_2312-80\\f" => "gbk"]
expected: FAIL
["\\fgb_2312-80\\f" => "gbk"]
expected: FAIL
["\\rgb_2312-80" => "gbk"]
expected: FAIL
["gb_2312-80\\r" => "gbk"]
expected: FAIL
["\\rgb_2312-80\\r" => "gbk"]
expected: FAIL
["gbk" => "gbk"]
expected: FAIL
[" gbk" => "gbk"]
expected: FAIL
["gbk " => "gbk"]
expected: FAIL
[" gbk " => "gbk"]
expected: FAIL
["\\tgbk" => "gbk"]
expected: FAIL
["gbk\\t" => "gbk"]
expected: FAIL
["\\tgbk\\t" => "gbk"]
expected: FAIL
["\\ngbk" => "gbk"]
expected: FAIL
["gbk\\n" => "gbk"]
expected: FAIL
["\\ngbk\\n" => "gbk"]
expected: FAIL
["\\fgbk" => "gbk"]
expected: FAIL
["gbk\\f" => "gbk"]
expected: FAIL
["\\fgbk\\f" => "gbk"]
expected: FAIL
["\\rgbk" => "gbk"]
expected: FAIL
["gbk\\r" => "gbk"]
expected: FAIL
["\\rgbk\\r" => "gbk"]
expected: FAIL
["iso-ir-58" => "gbk"]
expected: FAIL
[" iso-ir-58" => "gbk"]
expected: FAIL
["iso-ir-58 " => "gbk"]
expected: FAIL
[" iso-ir-58 " => "gbk"]
expected: FAIL
["\\tiso-ir-58" => "gbk"]
expected: FAIL
["iso-ir-58\\t" => "gbk"]
expected: FAIL
["\\tiso-ir-58\\t" => "gbk"]
expected: FAIL
["\\niso-ir-58" => "gbk"]
expected: FAIL
["iso-ir-58\\n" => "gbk"]
expected: FAIL
["\\niso-ir-58\\n" => "gbk"]
expected: FAIL
["\\fiso-ir-58" => "gbk"]
expected: FAIL
["iso-ir-58\\f" => "gbk"]
expected: FAIL
["\\fiso-ir-58\\f" => "gbk"]
expected: FAIL
["\\riso-ir-58" => "gbk"]
expected: FAIL
["iso-ir-58\\r" => "gbk"]
expected: FAIL
["\\riso-ir-58\\r" => "gbk"]
expected: FAIL
["x-gbk" => "gbk"]
expected: FAIL
[" x-gbk" => "gbk"]
expected: FAIL
["x-gbk " => "gbk"]
expected: FAIL
[" x-gbk " => "gbk"]
expected: FAIL
["\\tx-gbk" => "gbk"]
expected: FAIL
["x-gbk\\t" => "gbk"]
expected: FAIL
["\\tx-gbk\\t" => "gbk"]
expected: FAIL
["\\nx-gbk" => "gbk"]
expected: FAIL
["x-gbk\\n" => "gbk"]
expected: FAIL
["\\nx-gbk\\n" => "gbk"]
expected: FAIL
["\\fx-gbk" => "gbk"]
expected: FAIL
["x-gbk\\f" => "gbk"]
expected: FAIL
["\\fx-gbk\\f" => "gbk"]
expected: FAIL
["\\rx-gbk" => "gbk"]
expected: FAIL
["x-gbk\\r" => "gbk"]
expected: FAIL
["\\rx-gbk\\r" => "gbk"]
expected: FAIL
["utf-16" => "utf-16le"]
expected: FAIL
[" utf-16" => "utf-16le"]
expected: FAIL
["utf-16 " => "utf-16le"]
expected: FAIL
[" utf-16 " => "utf-16le"]
expected: FAIL
["\\tutf-16" => "utf-16le"]
expected: FAIL
["utf-16\\t" => "utf-16le"]
expected: FAIL
["\\tutf-16\\t" => "utf-16le"]
expected: FAIL
["\\nutf-16" => "utf-16le"]
expected: FAIL
["utf-16\\n" => "utf-16le"]
expected: FAIL
["\\nutf-16\\n" => "utf-16le"]
expected: FAIL
["\\futf-16" => "utf-16le"]
expected: FAIL
["utf-16\\f" => "utf-16le"]
expected: FAIL
["\\futf-16\\f" => "utf-16le"]
expected: FAIL
["\\rutf-16" => "utf-16le"]
expected: FAIL
["utf-16\\r" => "utf-16le"]
expected: FAIL
["\\rutf-16\\r" => "utf-16le"]
expected: FAIL
["utf-16le" => "utf-16le"]
expected: FAIL
[" utf-16le" => "utf-16le"]
expected: FAIL
["utf-16le " => "utf-16le"]
expected: FAIL
[" utf-16le " => "utf-16le"]
expected: FAIL
["\\tutf-16le" => "utf-16le"]
expected: FAIL
["utf-16le\\t" => "utf-16le"]
expected: FAIL
["\\tutf-16le\\t" => "utf-16le"]
expected: FAIL
["\\nutf-16le" => "utf-16le"]
expected: FAIL
["utf-16le\\n" => "utf-16le"]
expected: FAIL
["\\nutf-16le\\n" => "utf-16le"]
expected: FAIL
["\\futf-16le" => "utf-16le"]
expected: FAIL
["utf-16le\\f" => "utf-16le"]
expected: FAIL
["\\futf-16le\\f" => "utf-16le"]
expected: FAIL
["\\rutf-16le" => "utf-16le"]
expected: FAIL
["utf-16le\\r" => "utf-16le"]
expected: FAIL
["\\rutf-16le\\r" => "utf-16le"]
expected: FAIL

View file

@ -1,8 +0,0 @@
[textencoder-constructor-non-utf.html]
type: testharness
[Non-UTF encodings supported only for decode, not encode: gbk]
expected: FAIL
[UTF encodings are supported for encode and decode: utf-16le]
expected: FAIL

View file

@ -66,18 +66,6 @@
[<picture><span><source srcset="data:,b"></span><img src="data:,a" data-expect="data:,a"></picture>]
expected: FAIL
[<picture><svg><source srcset="data:,b"></svg><img src="data:,a" data-expect="data:,a"></picture>]
expected: FAIL
[<picture><svg><source srcset="data:,b"><img src="data:,a" data-expect="data:,b"></svg></picture>]
expected: FAIL
[<picture><svg><font><source srcset="data:,b"></font></svg><font><img src="data:,a" data-expect="data:,a"></font></picture>]
expected: FAIL
[<picture><svg><!--<font face> tag breaks out of svg--><font face=""></font><source srcset="data:,b"></svg><img src="data:,a" data-expect="data:,b"></picture>]
expected: FAIL
[<picture><img src="data:,a"><img src="data:,b" data-expect="data:,b"></picture>]
expected: FAIL
@ -267,3 +255,15 @@
[<picture><source srcset="data:,b"><img data-expect="data:,b"></picture>]
expected: FAIL
[<picture><svg><source srcset="data:,b"></source></svg><img src="data:,a" data-expect="data:,a"></picture>]
expected: FAIL
[<picture><svg></svg><source srcset="data:,b"><img src="data:,a" data-expect="data:,b"></picture>]
expected: FAIL
[<picture><svg><font></font><source srcset="data:,b"></source></svg><img src="data:,a" data-expect="data:,a"></picture>]
expected: FAIL
[<picture><svg><!--<font face> tag breaks out of svg--><font face=""></font><source srcset="data:,b"></source></svg><img src="data:,a" data-expect="data:,b"></picture>]
expected: FAIL

View file

@ -0,0 +1,5 @@
[131.html]
type: testharness
[scheduler: inline svg script ]
expected: FAIL

View file

@ -0,0 +1,5 @@
[133.html]
type: testharness
[scheduler: inline HTML script added by SVG script ]
expected: FAIL

View file

@ -1,5 +0,0 @@
[137.html]
type: testharness
[scheduler: SVG script empty xlink:href]
expected: FAIL

View file

@ -0,0 +1,5 @@
[145.html]
type: testharness
[scheduler: SVG inline script adding text to empty script ]
expected: FAIL

View file

@ -0,0 +1,5 @@
[146.html]
type: testharness
[scheduler: SVG script adding src attribute ]
expected: FAIL