Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: LayoutTests/webaudio/resources/audio-testing.js

Issue 1180613007: Allow larger arrays up to size 8192 for PeriodicWave (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and use Audit.runTasks() Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 if (window.testRunner) 1 if (window.testRunner)
2 testRunner.overridePreference("WebKitWebAudioEnabled", "1"); 2 testRunner.overridePreference("WebKitWebAudioEnabled", "1");
3 3
4 function writeString(s, a, offset) { 4 function writeString(s, a, offset) {
5 for (var i = 0; i < s.length; ++i) { 5 for (var i = 0; i < s.length; ++i) {
6 a[offset + i] = s.charCodeAt(i); 6 a[offset + i] = s.charCodeAt(i);
7 } 7 }
8 } 8 }
9 9
10 function writeInt16(n, a, offset) { 10 function writeInt16(n, a, offset) {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 var type = typeof value; 433 var type = typeof value;
434 this._assert(type === 'number' || type === 'string', 434 this._assert(type === 'number' || type === 'string',
435 'value should be number or string for'); 435 'value should be number or string for');
436 436
437 if (this.target === value) 437 if (this.target === value)
438 this._testFailed('should not be equal to ' + value); 438 this._testFailed('should not be equal to ' + value);
439 else 439 else
440 this._testPassed('is not equal to ' + value); 440 this._testPassed('is not equal to ' + value);
441 }; 441 };
442 442
443 // Check if |target| is greater than or equal to |value|.
444 //
445 // Example:
446 // Should("SNR", snr).greaterThanOrEqualTo(100);
447 // Result:
448 // "PASS SNR exceeds 100"
449 // "FAIL SNR (n) is not greater than or equal to 100"
450 ShouldModel.prototype.beGreaterThanOrEqualTo = function (value) {
451 var type = typeof value;
452 this._assert(type === 'number' || type === 'string',
453 'value should be number or string for');
454
455 if (this.target >= value)
456 this._testPassed("is greater than or equal to " + value);
457 else
458 this._testFailed("(" + this.target + ") is not greater than or equal to " + value);
459 }
460
443 // Check if |func| throws an exception with a certain |errorType| correctly. 461 // Check if |func| throws an exception with a certain |errorType| correctly.
444 // |errorType| is optional. 462 // |errorType| is optional.
445 // 463 //
446 // Example: 464 // Example:
447 // Should('A bad code', function () { var a = b; }).throw(); 465 // Should('A bad code', function () { var a = b; }).throw();
448 // Result: 466 // Result:
449 // "PASS A bad code threw an exception." 467 // "PASS A bad code threw an exception."
450 // Example: 468 // Example:
451 // Should('var c = d', function () { var c = d; }).throw('ReferenceError'); 469 // Should('var c = d', function () { var c = d; }).throw('ReferenceError');
452 // "PASS var c = d threw ReferenceError." 470 // "PASS var c = d threw ReferenceError."
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 if (opts.hasOwnProperty('numberOfErrorLog')) 676 if (opts.hasOwnProperty('numberOfErrorLog'))
659 _opts.numberOfErrorLog = opts.numberOfErrorLog; 677 _opts.numberOfErrorLog = opts.numberOfErrorLog;
660 if (opts.hasOwnProperty('numberOfArrayLog')) 678 if (opts.hasOwnProperty('numberOfArrayLog'))
661 _opts.numberOfArrayLog = opts.numberOfArrayLog; 679 _opts.numberOfArrayLog = opts.numberOfArrayLog;
662 } 680 }
663 681
664 return new ShouldModel(desc, target, _opts); 682 return new ShouldModel(desc, target, _opts);
665 }; 683 };
666 684
667 })(); 685 })();
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/periodicwave-lengths-expected.txt ('k') | Source/modules/webaudio/AbstractAudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698