mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Removed util.
This commit is contained in:
parent
01b6ad55bd
commit
9be4fd56ce
133 changed files with 396 additions and 352 deletions
|
@ -22,8 +22,8 @@ net = {path = "../../../components/net"}
|
|||
net_traits = {path = "../../../components/net_traits"}
|
||||
plugins = {path = "../../../components/plugins"}
|
||||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
servo_config = {path = "../../../components/config"}
|
||||
time = "0.1"
|
||||
unicase = "1.0"
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
servo_url = {path = "../../../components/url"}
|
||||
util = {path = "../../../components/util"}
|
||||
|
|
|
@ -25,6 +25,7 @@ use net::fetch::methods::{fetch, fetch_with_cors_cache};
|
|||
use net_traits::ReferrerPolicy;
|
||||
use net_traits::request::{Origin, RedirectMode, Referrer, Request, RequestMode};
|
||||
use net_traits::response::{CacheState, Response, ResponseBody, ResponseType};
|
||||
use servo_config::resource_files::resources_dir_path;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
@ -35,7 +36,6 @@ use std::sync::mpsc::{Sender, channel};
|
|||
use time::{self, Duration};
|
||||
use unicase::UniCase;
|
||||
use url::Origin as UrlOrigin;
|
||||
use util::resource_files::resources_dir_path;
|
||||
|
||||
// TODO write a struct that impls Handler for storing test values
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ extern crate msg;
|
|||
extern crate net;
|
||||
extern crate net_traits;
|
||||
extern crate profile_traits;
|
||||
extern crate servo_config;
|
||||
extern crate servo_url;
|
||||
extern crate time;
|
||||
extern crate unicase;
|
||||
extern crate url;
|
||||
extern crate util;
|
||||
|
||||
#[cfg(test)] mod chrome_loader;
|
||||
#[cfg(test)] mod cookie;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[package]
|
||||
name = "util_tests"
|
||||
name = "servo_config_tests"
|
||||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MPL-2.0"
|
||||
|
||||
[lib]
|
||||
name = "util_tests"
|
||||
name = "servo_config_tests"
|
||||
path = "lib.rs"
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
util = {path = "../../../components/util"}
|
||||
servo_config = {path = "../../../components/config"}
|
||||
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate util;
|
||||
extern crate servo_config;
|
||||
|
||||
mod opts;
|
||||
mod prefs;
|
||||
mod remutex;
|
||||
mod thread;
|
|
@ -2,8 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
use servo_config::opts::parse_url_or_filename;
|
||||
use std::path::Path;
|
||||
use util::opts::parse_url_or_filename;
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
const FAKE_CWD: &'static str = "/fake/cwd";
|
|
@ -2,10 +2,10 @@
|
|||
* 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/. */
|
||||
|
||||
use servo_config::basedir;
|
||||
use servo_config::prefs::{PREFS, PrefValue, read_prefs_from_file};
|
||||
use std::fs::{self, File};
|
||||
use std::io::{Read, Write};
|
||||
use util::basedir;
|
||||
use util::prefs::{PREFS, PrefValue, read_prefs_from_file};
|
||||
|
||||
#[test]
|
||||
fn test_create_pref() {
|
14
tests/unit/servo_remutex/Cargo.toml
Normal file
14
tests/unit/servo_remutex/Cargo.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[package]
|
||||
name = "servo_remutex_tests"
|
||||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MPL-2.0"
|
||||
|
||||
[lib]
|
||||
name = "servo_remutex_tests"
|
||||
path = "lib.rs"
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
servo_remutex = {path = "../../../components/remutex"}
|
||||
|
|
@ -10,10 +10,14 @@
|
|||
|
||||
// These tests came from https://github.com/rust-lang/rust/blob/master/src/libstd/sys/common/remutex.rs
|
||||
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate servo_remutex;
|
||||
|
||||
use servo_remutex::{ReentrantMutex, ReentrantMutexGuard};
|
||||
use std::cell::RefCell;
|
||||
use std::sync::Arc;
|
||||
use std::thread;
|
||||
use util::remutex::{ReentrantMutex, ReentrantMutexGuard};
|
||||
|
||||
#[test]
|
||||
fn smoke() {
|
|
@ -23,7 +23,7 @@ rustc-serialize = "0.3"
|
|||
selectors = "0.15"
|
||||
html5ever-atoms = "0.1"
|
||||
servo_atoms = {path = "../../../components/atoms"}
|
||||
servo_config = {path = "../../../components/config"}
|
||||
style = {path = "../../../components/style"}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
servo_url = {path = "../../../components/url"}
|
||||
util = {path = "../../../components/util"}
|
||||
|
|
|
@ -16,10 +16,10 @@ extern crate parking_lot;
|
|||
extern crate rustc_serialize;
|
||||
extern crate selectors;
|
||||
#[macro_use] extern crate servo_atoms;
|
||||
extern crate servo_config;
|
||||
extern crate servo_url;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
extern crate util;
|
||||
|
||||
mod atomic_refcell;
|
||||
mod attr;
|
||||
|
|
|
@ -6,6 +6,7 @@ use cssparser::Parser;
|
|||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::TypedSize2D;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use servo_config::prefs::{PREFS, PrefValue};
|
||||
use servo_url::ServoUrl;
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
|
@ -35,8 +36,7 @@ fn test_viewport_rule<F>(css: &str,
|
|||
callback: F)
|
||||
where F: Fn(&Vec<ViewportDescriptorDeclaration>, &str)
|
||||
{
|
||||
::util::prefs::PREFS.set("layout.viewport.enabled",
|
||||
::util::prefs::PrefValue::Boolean(true));
|
||||
PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true));
|
||||
let stylesheet = stylesheet!(css, Author, Box::new(CSSErrorReporterTest));
|
||||
let mut rule_count = 0;
|
||||
stylesheet.effective_viewport_rules(&device, |rule| {
|
||||
|
@ -250,8 +250,7 @@ fn cascading_within_viewport_rule() {
|
|||
|
||||
#[test]
|
||||
fn multiple_stylesheets_cascading() {
|
||||
::util::prefs::PREFS.set("layout.viewport.enabled",
|
||||
::util::prefs::PrefValue::Boolean(true));
|
||||
PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true));
|
||||
let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
|
||||
let error_reporter = CSSErrorReporterTest;
|
||||
let stylesheets = vec![
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::thread::spawn_named;
|
||||
|
||||
#[test]
|
||||
fn spawn_named_test() {
|
||||
spawn_named("Test".to_owned(), move || {
|
||||
println!("I can run!");
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue