RESOLVED FIXED 150385
ConvolverNode.buffer must have same sample rate as the AudioContext
https://bugs.webkit.org/show_bug.cgi?id=150385
Summary ConvolverNode.buffer must have same sample rate as the AudioContext
Hyemi Shin
Reported 2015-10-21 00:03:24 PDT
ConvolverNode.buffer must be of the same sample-rate as the AudioContext or an NOT_SUPPORTED_ERR exception MUST be thrown.
Attachments
Patch (3.07 KB, patch)
2015-10-21 00:06 PDT, Hyemi Shin
no flags
Patch (5.17 KB, patch)
2015-10-21 17:19 PDT, Hyemi Shin
no flags
Archive of layout-test-results from ews107 for mac-mavericks-wk2 (849.72 KB, application/zip)
2015-10-21 17:42 PDT, Build Bot
no flags
Archive of layout-test-results from ews100 for mac-mavericks (634.17 KB, application/zip)
2015-10-21 17:55 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-yosemite (841.91 KB, application/zip)
2015-10-21 18:08 PDT, Build Bot
no flags
Patch (5.17 KB, patch)
2015-10-21 19:06 PDT, Hyemi Shin
no flags
Archive of layout-test-results from ews101 for mac-mavericks (628.66 KB, application/zip)
2015-10-21 19:39 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-mavericks-wk2 (682.50 KB, application/zip)
2015-10-21 19:45 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-yosemite (765.66 KB, application/zip)
2015-10-21 20:06 PDT, Build Bot
no flags
Patch (5.64 KB, patch)
2015-10-21 21:46 PDT, Hyemi Shin
no flags
Archive of layout-test-results from ews103 for mac-mavericks (628.94 KB, application/zip)
2015-10-21 22:21 PDT, Build Bot
no flags
Patch (5.67 KB, patch)
2015-10-21 22:23 PDT, Hyemi Shin
no flags
Archive of layout-test-results from ews100 for mac-mavericks (628.47 KB, application/zip)
2015-10-21 22:56 PDT, Build Bot
no flags
Patch (5.67 KB, patch)
2015-10-21 23:01 PDT, Hyemi Shin
no flags
Patch (4.81 KB, patch)
2015-10-22 21:01 PDT, Hyemi Shin
no flags
Patch (5.56 KB, patch)
2015-10-22 21:25 PDT, Hyemi Shin
no flags
Patch (5.57 KB, patch)
2015-10-22 21:31 PDT, Hyemi Shin
no flags
Archive of layout-test-results from ews101 for mac-mavericks (693.13 KB, application/zip)
2015-10-22 21:49 PDT, Build Bot
no flags
Archive of layout-test-results from ews107 for mac-mavericks-wk2 (772.91 KB, application/zip)
2015-10-22 21:59 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-yosemite (836.68 KB, application/zip)
2015-10-22 22:26 PDT, Build Bot
no flags
Patch (5.60 KB, patch)
2015-10-22 23:19 PDT, Hyemi Shin
no flags
Hyemi Shin
Comment 1 2015-10-21 00:06:58 PDT
Darin Adler
Comment 2 2015-10-21 08:53:48 PDT
Comment on attachment 263664 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263664&action=review > Source/WebCore/ChangeLog:11 > + No new tests. Why? We need a test demonstrating this correct behavior.
Hyemi Shin
Comment 3 2015-10-21 17:19:32 PDT
Hyemi Shin
Comment 4 2015-10-21 17:20:27 PDT
I'm not sure I made new test correctly.. Please take a look.
Build Bot
Comment 5 2015-10-21 17:42:14 PDT
Comment on attachment 263769 [details] Patch Attachment 263769 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/318438 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 6 2015-10-21 17:42:17 PDT
Created attachment 263771 [details] Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 7 2015-10-21 17:55:43 PDT
Comment on attachment 263769 [details] Patch Attachment 263769 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/318564 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 8 2015-10-21 17:55:46 PDT
Created attachment 263773 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 9 2015-10-21 18:08:20 PDT
Comment on attachment 263769 [details] Patch Attachment 263769 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/318523 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 10 2015-10-21 18:08:23 PDT
Created attachment 263775 [details] Archive of layout-test-results from ews112 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-yosemite Platform: Mac OS X 10.10.5
Hyemi Shin
Comment 11 2015-10-21 19:06:20 PDT
Build Bot
Comment 12 2015-10-21 19:39:41 PDT
Comment on attachment 263779 [details] Patch Attachment 263779 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/319280 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 13 2015-10-21 19:39:43 PDT
Created attachment 263783 [details] Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 14 2015-10-21 19:45:43 PDT
Comment on attachment 263779 [details] Patch Attachment 263779 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/319292 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 15 2015-10-21 19:45:45 PDT
Created attachment 263784 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Hyemi Shin
Comment 16 2015-10-21 19:52:09 PDT
Could anyone help me to fix test failiures on mavericks and yosemite only?
Build Bot
Comment 17 2015-10-21 20:06:15 PDT
Comment on attachment 263779 [details] Patch Attachment 263779 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/319293 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 18 2015-10-21 20:06:18 PDT
Created attachment 263785 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Hyemi Shin
Comment 19 2015-10-21 21:46:54 PDT
Build Bot
Comment 20 2015-10-21 22:20:59 PDT
Comment on attachment 263792 [details] Patch Attachment 263792 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/319993 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 21 2015-10-21 22:21:04 PDT
Created attachment 263794 [details] Archive of layout-test-results from ews103 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-mavericks Platform: Mac OS X 10.9.5
Hyemi Shin
Comment 22 2015-10-21 22:23:22 PDT
Build Bot
Comment 23 2015-10-21 22:56:29 PDT
Comment on attachment 263795 [details] Patch Attachment 263795 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/320134 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 24 2015-10-21 22:56:33 PDT
Created attachment 263796 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Hyemi Shin
Comment 25 2015-10-21 23:01:56 PDT
Jer Noble
Comment 26 2015-10-21 23:32:35 PDT
(In reply to comment #25) > Created attachment 263797 [details] > Patch r=me. Thanks!
Hyemi Shin
Comment 27 2015-10-22 15:40:24 PDT
(In reply to comment #26) > (In reply to comment #25) > > Created attachment 263797 [details] > > Patch > > r=me. Thanks! Thanks! could you give me cq+?
Chris Dumez
Comment 28 2015-10-22 15:53:23 PDT
Comment on attachment 263797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263797&action=review > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:1 > +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html> > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:9 > +<div id="description"></div> Not needed. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:10 > +<div id="console"></div> Not needed. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:15 > +function runTest() You don't really need a function. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:17 > + if (window.testRunner) { This whole if block is not needed. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:22 > + window.jsTestIsAsync = true; I don't see why this test needs to be async. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:25 > + var conv = context.createConvolver(); No abbreviations in variable names please. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:27 > + try { shouldThrow("conv.buffer = context.createBuffer(1, 256, 22050)", "'Error: NOT_SUPPORTED_ERR'"); (or similar). > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:37 > + try { Could use shouldThrow() as well. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:44 > + finishJSTest(); Not needed. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:48 > +successfullyParsed = true; Should not be needed.
Chris Dumez
Comment 29 2015-10-22 15:59:34 PDT
Comment on attachment 263797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263797&action=review > Source/WebCore/ChangeLog:11 > + Test added to LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html (amended) Test: webaudio/convolver-setBuffer-different-samplerate.html
Hyemi Shin
Comment 30 2015-10-22 16:03:54 PDT
(In reply to comment #28) > Comment on attachment 263797 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=263797&action=review > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:27 > > + try { > > shouldThrow("conv.buffer = context.createBuffer(1, 256, 22050)", "'Error: > NOT_SUPPORTED_ERR'"); (or similar). > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:37 > > + try { > > Could use shouldThrow() I used shouldThrow() and shouldNotThrow() at first, but it made an error on Mavericks and Yosemite. That's because why I use try-catch. Rest of comments will be applied in next patch attachment. Thanks.
Chris Dumez
Comment 31 2015-10-22 16:06:27 PDT
(In reply to comment #30) > (In reply to comment #28) > > Comment on attachment 263797 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=263797&action=review > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:27 > > > + try { > > > > shouldThrow("conv.buffer = context.createBuffer(1, 256, 22050)", "'Error: > > NOT_SUPPORTED_ERR'"); (or similar). > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:37 > > > + try { > > > > Could use shouldThrow() > > I used shouldThrow() and shouldNotThrow() at first, but it made an error on > Mavericks and Yosemite. That's because why I use try-catch. Rest of comments > will be applied in next patch attachment. Thanks. There is no reason for shouldThrow() to behave different on one platform vs another.
Chris Dumez
Comment 32 2015-10-22 16:10:50 PDT
(In reply to comment #31) > (In reply to comment #30) > > (In reply to comment #28) > > > Comment on attachment 263797 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=263797&action=review > > > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:27 > > > > + try { > > > > > > shouldThrow("conv.buffer = context.createBuffer(1, 256, 22050)", "'Error: > > > NOT_SUPPORTED_ERR'"); (or similar). > > > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:37 > > > > + try { > > > > > > Could use shouldThrow() > > > > I used shouldThrow() and shouldNotThrow() at first, but it made an error on > > Mavericks and Yosemite. That's because why I use try-catch. Rest of comments > > will be applied in next patch attachment. Thanks. > > There is no reason for shouldThrow() to behave different on one platform vs > another. I looked at your previous diffs and saw the following error: +PASS conv.buffer = context.createBuffer(1, 100, 22050) threw exception ReferenceError: Can't find variable: conv. The issue was that the 'conv' variable was in the runTest() function scope, which is not compatible with should*() functions. Once you get rid of the runTest() function as I suggested, you WILL be able to use shouldThrow() again (please do). Note that alternatively, you could have declared 'conv' at global level by omitting the 'var'.
Hyemi Shin
Comment 33 2015-10-22 16:16:23 PDT
(In reply to comment #32) > (In reply to comment #31) > > (In reply to comment #30) > > > (In reply to comment #28) > > > > Comment on attachment 263797 [details] > > > > Patch > > > > > > > > View in context: > > > > https://bugs.webkit.org/attachment.cgi?id=263797&action=review > > > > > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:27 > > > > > + try { > > > > > > > > shouldThrow("conv.buffer = context.createBuffer(1, 256, 22050)", "'Error: > > > > NOT_SUPPORTED_ERR'"); (or similar). > > > > > > > > > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:37 > > > > > + try { > > > > > > > > Could use shouldThrow() > > > > > > I used shouldThrow() and shouldNotThrow() at first, but it made an error on > > > Mavericks and Yosemite. That's because why I use try-catch. Rest of comments > > > will be applied in next patch attachment. Thanks. > > > > There is no reason for shouldThrow() to behave different on one platform vs > > another. > > I looked at your previous diffs and saw the following error: > +PASS conv.buffer = context.createBuffer(1, 100, 22050) threw exception > ReferenceError: Can't find variable: conv. > > The issue was that the 'conv' variable was in the runTest() function scope, > which is not compatible with should*() functions. Once you get rid of the > runTest() function as I suggested, you WILL be able to use shouldThrow() > again (please do). > > Note that alternatively, you could have declared 'conv' at global level by > omitting the 'var'. Ok, i will try. Thanks a lot.
Hyemi Shin
Comment 34 2015-10-22 21:01:46 PDT
Chris Dumez
Comment 35 2015-10-22 21:16:38 PDT
Comment on attachment 263890 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263890&action=review > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:15 > +shouldThrow("convolver.buffer = context.createBuffer(1, 256, 22050)"); Please specify the exception as second parameter: shouldThrow("convolver.buffer = context.createBuffer(1, 256, 22050)", "'Error: NotSupportedError: DOM Exception 9'"); > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:18 > +runTest(); Forgot to remove this.
Chris Dumez
Comment 36 2015-10-22 21:17:15 PDT
Comment on attachment 263890 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263890&action=review > Source/WebCore/ChangeLog:11 > + Test added to LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html Also, this should look like: Test: webaudio/convolver-setBuffer-different-samplerate.html
Chris Dumez
Comment 37 2015-10-22 21:19:38 PDT
Comment on attachment 263890 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263890&action=review > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:1 > +<!DOCTYPE HTML"> again, this should be: <!DOCTYPE html>
Hyemi Shin
Comment 38 2015-10-22 21:25:01 PDT
Chris Dumez
Comment 39 2015-10-22 21:29:04 PDT
Comment on attachment 263893 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263893&action=review This will NOT pass EWS. > Source/WebCore/ChangeLog:11 > + Test : webaudio/convolver-setBuffer-different-samplerate.html Test: > LayoutTests/webaudio/convolver-setBuffer-different-samplerate-expected.txt:5 > +PASS conv.buffer = context.createBuffer(1, 256, 22050) threw exception Error: NotSupportedError: DOM Exception 9. conv -> convolver > LayoutTests/webaudio/convolver-setBuffer-different-samplerate-expected.txt:6 > +PASS conv.buffer = context.createBuffer(1, 256, 44100) did not throw exception ditto. > LayoutTests/webaudio/convolver-setBuffer-different-samplerate.html:16 > +shouldNotThrow("conv.buffer = context.createBuffer(1, 256, 44100)"); Please run your test.. conv -> convolver
Hyemi Shin
Comment 40 2015-10-22 21:31:37 PDT
Build Bot
Comment 41 2015-10-22 21:49:26 PDT
Comment on attachment 263895 [details] Patch Attachment 263895 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/325579 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 42 2015-10-22 21:49:29 PDT
Created attachment 263897 [details] Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Chris Dumez
Comment 43 2015-10-22 21:52:38 PDT
How do you generate your test expectations? The diff looks like so: http://pastebin.com/dn0d7FD5
Chris Dumez
Comment 44 2015-10-22 21:54:52 PDT
(In reply to comment #43) > How do you generate your test expectations? > > The diff looks like so: > http://pastebin.com/dn0d7FD5 We usually do: Tools/Scripts/run-webkit-tests --reset-results webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 45 2015-10-22 21:59:11 PDT
Comment on attachment 263895 [details] Patch Attachment 263895 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/325589 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 46 2015-10-22 21:59:15 PDT
Created attachment 263898 [details] Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 47 2015-10-22 22:26:08 PDT
Comment on attachment 263895 [details] Patch Attachment 263895 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/325629 New failing tests: webaudio/convolver-setBuffer-different-samplerate.html
Build Bot
Comment 48 2015-10-22 22:26:13 PDT
Created attachment 263901 [details] Archive of layout-test-results from ews112 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-yosemite Platform: Mac OS X 10.10.5
Hyemi Shin
Comment 49 2015-10-22 23:19:08 PDT
Chris Dumez
Comment 50 2015-10-22 23:51:39 PDT
Comment on attachment 263905 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263905&action=review r=me > Source/WebCore/ChangeLog:11 > + Test : webaudio/convolver-setBuffer-different-samplerate.html In the future, please no space before the ':'. No need to reupload for this though.
Hyemi Shin
Comment 51 2015-10-22 23:53:25 PDT
(In reply to comment #50) > Comment on attachment 263905 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=263905&action=review > > r=me > > > Source/WebCore/ChangeLog:11 > > + Test : webaudio/convolver-setBuffer-different-samplerate.html > > In the future, please no space before the ':'. No need to reupload for this > though. Thank you for your advices!
WebKit Commit Bot
Comment 52 2015-10-23 00:38:13 PDT
Comment on attachment 263905 [details] Patch Clearing flags on attachment: 263905 Committed r191492: <http://trac.webkit.org/changeset/191492>
WebKit Commit Bot
Comment 53 2015-10-23 00:38:20 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.