OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/testharness.js"></script> | 4 <script src="../resources/testharness.js"></script> |
5 <script src="../resources/testharnessreport.js"></script> | 5 <script src="../resources/testharnessreport.js"></script> |
6 <script src="resources/audit-util.js"></script> | 6 <script src="resources/audit-util.js"></script> |
7 <script src="resources/audit.js"></script> | 7 <script src="resources/audit.js"></script> |
8 <script src="resources/biquad-testing.js"></script> | 8 <script src="resources/biquad-testing.js"></script> |
9 </head> | 9 </head> |
10 | 10 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 task.done(); | 399 task.done(); |
400 }); | 400 }); |
401 | 401 |
402 audit.define('offline-audio-context', (task, should) => { | 402 audit.define('offline-audio-context', (task, should) => { |
403 // OfflineAudioContext | 403 // OfflineAudioContext |
404 // Max supported channels | 404 // Max supported channels |
405 should( | 405 should( |
406 () => new OfflineAudioContext(32, 100, context.sampleRate), | 406 () => new OfflineAudioContext(32, 100, context.sampleRate), |
407 'new OfflineAudioContext(32, 100, context.sampleRate)') | 407 'new OfflineAudioContext(32, 100, context.sampleRate)') |
408 .notThrow(); | 408 .notThrow(); |
409 // Invalid number of channels (unspecified error) | 409 // Invalid number of channels |
| 410 should( |
| 411 () => new OfflineAudioContext(0, 100, context.sampleRate), |
| 412 'new OfflineAudioContext(0, 100, context.sampleRate)') |
| 413 .throw('NotSupportedError'); |
410 should( | 414 should( |
411 () => new OfflineAudioContext(99, 100, context.sampleRate), | 415 () => new OfflineAudioContext(99, 100, context.sampleRate), |
412 'new OfflineAudioContext(99, 100, context.sampleRate)') | 416 'new OfflineAudioContext(99, 100, context.sampleRate)') |
413 .throw(); | 417 .throw('NotSupportedError'); |
414 // Invalid sample rate. (unspecified error) | 418 // Invalid sample rate. |
415 should( | 419 should( |
416 () => new OfflineAudioContext(1, 100, 1), | 420 () => new OfflineAudioContext(1, 100, 1), |
417 'new OfflineAudioContext(1, 100, 1)') | 421 'new OfflineAudioContext(1, 100, 1)') |
418 .throw(); | 422 .throw('NotSupportedError'); |
419 should( | 423 should( |
420 () => new OfflineAudioContext(1, 100, 1e6), | 424 () => new OfflineAudioContext(1, 100, 1e6), |
421 'new OfflineAudioContext(1, 100, 1e6)') | 425 'new OfflineAudioContext(1, 100, 1e6)') |
422 .throw(); | 426 .throw('NotSupportedError'); |
423 // Invalid frame length (crbug.com/351277) | 427 // Invalid frame length (crbug.com/351277) |
424 should( | 428 should( |
425 () => new OfflineAudioContext(1, -88200000000000, 44100), | 429 () => new OfflineAudioContext(1, -88200000000000, 44100), |
426 'new OfflineAudioContext(1, -88200000000000, 44100)') | 430 'new OfflineAudioContext(1, -88200000000000, 44100)') |
427 .throw(); | 431 .throw('NotSupportedError'); |
| 432 should( |
| 433 () => new OfflineAudioContext(1, 0, 44100), |
| 434 'new OfflineAudioContext(1, 0, 44100)') |
| 435 .throw('NotSupportedError'); |
428 | 436 |
429 task.done(); | 437 task.done(); |
430 }); | 438 }); |
431 | 439 |
432 audit.define('waveshaper', (task, should) => { | 440 audit.define('waveshaper', (task, should) => { |
433 // WaveShaper types | 441 // WaveShaper types |
434 node = context.createWaveShaper(); | 442 node = context.createWaveShaper(); |
435 currentOversample = node.oversample; | 443 currentOversample = node.oversample; |
436 should(() => node.oversample = '9x', 'node.oversample = "9x"').notThrow(); | 444 should(() => node.oversample = '9x', 'node.oversample = "9x"').notThrow(); |
437 should(node.oversample, 'node.oversample').beEqualTo(currentOversample); | 445 should(node.oversample, 'node.oversample').beEqualTo(currentOversample); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 should(source.noteOn, 'source.noteOn').beEqualTo(undefined); | 701 should(source.noteOn, 'source.noteOn').beEqualTo(undefined); |
694 should(source.noteOff, 'source.noteOff').beEqualTo(undefined); | 702 should(source.noteOff, 'source.noteOff').beEqualTo(undefined); |
695 | 703 |
696 task.done(); | 704 task.done(); |
697 }); | 705 }); |
698 | 706 |
699 audit.run(); | 707 audit.run(); |
700 </script> | 708 </script> |
701 </body> | 709 </body> |
702 </html> | 710 </html> |
OLD | NEW |