aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/script/dom/blob.rs
diff options
context:
space:
mode:
authorZhen Zhang <izgzhen@gmail.com>2016-07-05 16:42:07 +0800
committerZhen Zhang <izgzhen@gmail.com>2016-07-05 17:51:53 +0800
commitab14777312b6bc0e21736f907bc22364dea143d3 (patch)
tree9cd66fac8556e87da7b483785a8c8a27de1527ec /tests/unit/script/dom/blob.rs
parent1cba3b3e9835fffbae91ab9dac76ed1f75bcf5c7 (diff)
downloadservo-ab14777312b6bc0e21736f907bc22364dea143d3.tar.gz
servo-ab14777312b6bc0e21736f907bc22364dea143d3.zip
Remove DataSlice, fix #12249
Diffstat (limited to 'tests/unit/script/dom/blob.rs')
-rw-r--r--tests/unit/script/dom/blob.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/unit/script/dom/blob.rs b/tests/unit/script/dom/blob.rs
deleted file mode 100644
index fa670ec28c4..00000000000
--- a/tests/unit/script/dom/blob.rs
+++ /dev/null
@@ -1,34 +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 script::dom::blob::DataSlice;
-use std::sync::Arc;
-
-#[test]
-fn test_data_slice_without_start_end_should_match_buffer_size() {
- let bytes = Arc::new(vec![1u8, 2u8, 3u8]);
- let data = DataSlice::new(bytes, None, None);
- assert_eq!(data.size(), 3);
-}
-
-#[test]
-fn test_data_slice_should_prevent_reverse_bounds() {
- let bytes = Arc::new(vec![1u8, 2, 3, 4, 5]);
- let start = Some(3);
- let end = Some(1);
-
- let data = DataSlice::new(bytes, start, end);
- assert_eq!(data.size(), 0);
-}
-
-#[test]
-fn test_data_slice_should_respect_correct_bounds() {
- let bytes = Arc::new(vec![1u8, 2, 3, 4, 5]);
- let start = Some(1);
- let end = Some(3);
-
- let data = DataSlice::new(bytes, start, end);
- let expected = [2u8, 3];
- assert_eq!(&expected, data.get_bytes());
-}