diff options
-rw-r--r-- | components/layout/lib.rs | 1 | ||||
-rw-r--r-- | tests/unit/layout/size_of.rs | 21 | ||||
-rw-r--r-- | tests/unit/script/size_of.rs | 2 |
3 files changed, 2 insertions, 22 deletions
diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 62da36cff87..d1eb3cf41ba 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -103,4 +103,3 @@ mod wrapper; // For unit tests: pub use fragment::Fragment; -pub use wrapper::ServoThreadSafeLayoutNode; diff --git a/tests/unit/layout/size_of.rs b/tests/unit/layout/size_of.rs index 033916647ee..320f85e0169 100644 --- a/tests/unit/layout/size_of.rs +++ b/tests/unit/layout/size_of.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use layout::Fragment; -use layout::ServoThreadSafeLayoutNode; use std::mem::size_of; #[test] @@ -25,23 +24,3 @@ fn test_size_of_fragment() { expected, actual); } } - -#[test] -fn test_size_of_layout_node() { - let expected = 16; - let actual = size_of::<ServoThreadSafeLayoutNode>(); - - if actual < expected { - panic!("Your changes have decreased the stack size of layout::wrapper::ServoThreadSafeLayoutNode \ - from {} to {}. Good work! Please update the size in tests/layout/unit/size_of.rs", - expected, actual); - } - - if actual > expected { - panic!("Your changes have increased the stack size of layout::wrapper::ServoThreadSafeLayoutNode \ - from {} to {}. Please consider choosing a design which avoids this increase. \ - If you feel that the increase is necessary, update the size in \ - tests/unit/layout/size_of.rs.", - expected, actual); - } -} diff --git a/tests/unit/script/size_of.rs b/tests/unit/script/size_of.rs index fc9cf6f09bf..21b8e4a4ba2 100644 --- a/tests/unit/script/size_of.rs +++ b/tests/unit/script/size_of.rs @@ -10,6 +10,7 @@ use script::dom::htmlelement::HTMLElement; use script::dom::htmlspanelement::HTMLSpanElement; use script::dom::node::Node; use script::dom::text::Text; +use script::layout_wrapper::ServoThreadSafeLayoutNode; use std::mem::size_of; // Macro so that we can stringify type names @@ -45,3 +46,4 @@ sizeof_checker!(size_div, HTMLDivElement, 328); sizeof_checker!(size_span, HTMLSpanElement, 328); sizeof_checker!(size_text, Text, 192); sizeof_checker!(size_characterdata, CharacterData, 192); +sizeof_checker!(size_servothreadsafelayoutnode, ServoThreadSafeLayoutNode, 16); |