aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/net/tests
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-05-20 16:05:18 +0530
committerGitHub <noreply@github.com>2024-05-20 10:35:18 +0000
commit2af6fe0b30a275e5fd8a43eca4126d82639fbaa9 (patch)
tree2687a12c392b30cba7cdcd849133d0d382b79cbe /components/shared/net/tests
parentc2076580f352f3c61f90969e03d78ada609935eb (diff)
downloadservo-2af6fe0b30a275e5fd8a43eca4126d82639fbaa9.tar.gz
servo-2af6fe0b30a275e5fd8a43eca4126d82639fbaa9.zip
compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)
* Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/shared/net/tests')
-rw-r--r--components/shared/net/tests/image.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/components/shared/net/tests/image.rs b/components/shared/net/tests/image.rs
deleted file mode 100644
index a4963702b57..00000000000
--- a/components/shared/net/tests/image.rs
+++ /dev/null
@@ -1,28 +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 https://mozilla.org/MPL/2.0/. */
-
-use net_traits::image::base::detect_image_format;
-
-#[test]
-fn test_supported_images() {
- let gif1 = [b'G', b'I', b'F', b'8', b'7', b'a'];
- let gif2 = [b'G', b'I', b'F', b'8', b'9', b'a'];
- let jpeg = [0xff, 0xd8, 0xff];
- let png = [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A];
- let webp = [
- b'R', b'I', b'F', b'F', 0x01, 0x02, 0x03, 0x04, b'W', b'E', b'B', b'P', b'V', b'P',
- ];
- let bmp = [0x42, 0x4D];
- let ico = [0x00, 0x00, 0x01, 0x00];
- let junk_format = [0x01, 0x02, 0x03, 0x04, 0x05];
-
- assert!(detect_image_format(&gif1).is_ok());
- assert!(detect_image_format(&gif2).is_ok());
- assert!(detect_image_format(&jpeg).is_ok());
- assert!(detect_image_format(&png).is_ok());
- assert!(detect_image_format(&webp).is_ok());
- assert!(detect_image_format(&bmp).is_ok());
- assert!(detect_image_format(&ico).is_ok());
- assert!(detect_image_format(&junk_format).is_err());
-}