diff --git a/servo/src/servo/image/base.rs b/servo/src/servo/image/base.rs index ca51cb57156f..aed20f016b44 100644 --- a/servo/src/servo/image/base.rs +++ b/servo/src/servo/image/base.rs @@ -11,6 +11,8 @@ import stb_image::image::{image, load, load_from_memory}; type Image = image; +const TEST_IMAGE: [u8 * 88129] = #include_bin("test.jpeg"); + fn test_image_bin() -> ~[u8] { - #include_bin("test.jpeg") -} \ No newline at end of file + return vec::from_fn(88129, |i| TEST_IMAGE[i]); +} diff --git a/servo/src/servo/text/font.rs b/servo/src/servo/text/font.rs index 2317e914ded7..c94cf34b1f5e 100644 --- a/servo/src/servo/text/font.rs +++ b/servo/src/servo/text/font.rs @@ -38,7 +38,11 @@ class Font { } } -fn test_font_bin() -> ~[u8] { #include_bin("JosefinSans-SemiBold.ttf") } +const TEST_FONT: [u8 * 33004] = #include_bin("JosefinSans-SemiBold.ttf"); + +fn test_font_bin() -> ~[u8] { + return vec::from_fn(33004, |i| TEST_FONT[i]); +} fn should_destruct_on_fail_without_leaking() { #[test];