summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webaudio/js/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webaudio/js/helpers.js')
-rw-r--r--testing/web-platform/tests/webaudio/js/helpers.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/testing/web-platform/tests/webaudio/js/helpers.js b/testing/web-platform/tests/webaudio/js/helpers.js
deleted file mode 100644
index 9e4ee6fa3..000000000
--- a/testing/web-platform/tests/webaudio/js/helpers.js
+++ /dev/null
@@ -1,33 +0,0 @@
-function assert_array_approx_equals(actual, expected, epsilon, description)
-{
- assert_true(actual.length === expected.length,
- (description + ": lengths differ, expected " + expected.length + " got " + actual.length))
-
- for (var i=0; i < actual.length; i++) {
- assert_approx_equals(actual[i], expected[i], epsilon, (description + ": element " + i))
- }
-}
-
-/*
- Returns an array (typed or not), of the passed array with removed trailing and ending
- zero-valued elements
- */
-function trimEmptyElements(array) {
- var start = 0;
- var end = array.length;
-
- while (start < array.length) {
- if (array[start] !== 0) {
- break;
- }
- start++;
- }
-
- while (end > 0) {
- end--;
- if (array[end] !== 0) {
- break;
- }
- }
- return array.subarray(start, end);
-}