Bug 1530178 - Fix audiobuffer-copy-channel.html to allow copyFromChannel/copyToChannel wth an offset of n on an array that is n elements long. r=karlt
authorPaul Adenot <paul@paul.cx>
Thu, 02 May 2019 09:24:57 +0000
changeset 531066 1c983b486cd0785a8d0a795b2fa845c72ca06add
parent 531065 fe9afae0f868666eec95b151b50d5c6783c3cd91
child 531067 bfebd4300498feec18eab878c5fecf005d468d13
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1530178
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530178 - Fix audiobuffer-copy-channel.html to allow copyFromChannel/copyToChannel wth an offset of n on an array that is n elements long. r=karlt This is a no-op, but is allowed per spec: > An optional offset to copy the data to. If startInChannel is greater than the > length of the AudioBuffer, an IndexSizeError MUST be thrown. If the numbers are equals, this shouldn't throw. Differential Revision: https://phabricator.services.mozilla.com/D29358
testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
--- a/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
@@ -138,17 +138,17 @@
         should(() => {
           buffer.copyFromChannel(x, 0, -1);
         }, '5: buffer.copyFromChannel(x, 0, -1)').throw(DOMException, 'IndexSizeError');
         should(
             () => {
               buffer.copyFromChannel(x, 0, bufferLength);
             },
             '6: buffer.copyFromChannel(x, 0, ' + bufferLength + ')')
-            .throw(DOMException, 'IndexSizeError');
+            .notThrow();
 
         should(() => {
           buffer.copyFromChannel(x, 3);
         }, '7: buffer.copyFromChannel(x, 3)').throw(DOMException, 'IndexSizeError');
 
         if (window.SharedArrayBuffer) {
           let shared_buffer = new Float32Array(new SharedArrayBuffer(32));
           should(
@@ -193,17 +193,17 @@
         should(() => {
           buffer.copyToChannel(x, 0, -1);
         }, '4: buffer.copyToChannel(x, 0, -1)').throw(DOMException, 'IndexSizeError');
         should(
             () => {
               buffer.copyToChannel(x, 0, bufferLength);
             },
             '5: buffer.copyToChannel(x, 0, ' + bufferLength + ')')
-            .throw(DOMException, 'IndexSizeError');
+            .notThrow();
 
         should(() => {
           buffer.copyToChannel(x, 3);
         }, '6: buffer.copyToChannel(x, 3)').throw(DOMException, 'IndexSizeError');
 
         if (window.SharedArrayBuffer) {
           let shared_buffer = new Float32Array(new SharedArrayBuffer(32));
           should(
@@ -316,16 +316,15 @@
           let startInChannel = 5;
           buffer.copyToChannel(src10, c, startInChannel);
 
           shouldBeRamp(
               should,
               'buffer.copyToChannel(src10, ' + c + ', ' + startInChannel + ')',
               buffer.getChannelData(c), 1, src10.length, startInChannel);
         }
-
         task.done();
       });
 
       audit.run();
     </script>
   </body>
 </html>