servo/tests/unit/style/lib.rs
author Hiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 28 Dec 2016 02:06:38 -0800
changeset 340434 77f675794490dd0d93991975510b385fab061b93
parent 340379 1dfcd30ab73121f531bd96ee70120a7396a48e12
child 340473 b2a4b1399cd6402faae03468bfc64a56b333071f
permissions -rw-r--r--
servo: Merge #14747 - Interpolate colors with premultiplied alpha (from hiikezoe:color-interpolation2); r=emilio We need to clamp each interpolated values because some cubic-bezier functions produce values that are out of range [0, 1]. r? @emilio <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: f9d971771c62f244c338be1cb34e0aa191d64206

/* 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/. */

#![cfg(test)]
#![feature(plugin, test)]

extern crate app_units;
extern crate cssparser;
extern crate euclid;
#[macro_use] extern crate html5ever_atoms;
#[macro_use] #[allow(unused_extern_crates)] extern crate matches;
extern crate owning_ref;
extern crate parking_lot;
extern crate rayon;
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 test;

mod animated_properties;
mod atomic_refcell;
mod attr;
mod cache;
mod logical_geometry;
mod media_queries;
mod owning_handle;
mod parsing;
mod properties;
mod rule_tree;
mod str;
mod stylesheets;
mod stylist;
mod value;
mod viewport;

mod writing_modes {
    use style::logical_geometry::WritingMode;
    use style::properties::{INITIAL_SERVO_VALUES, get_writing_mode};

    #[test]
    fn initial_writing_mode_is_empty() {
        assert_eq!(get_writing_mode(INITIAL_SERVO_VALUES.get_inheritedbox()), WritingMode::empty())
    }
}