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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html

Issue 2781643002: Audit should support Uint8Arrays (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html
index adb2d78512b4572b6f5e65edb723036ad644cda2..1dbcb6da5d88a2399cb4b4f1f563c89c9203a73d 100644
--- a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html
+++ b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html
@@ -65,6 +65,17 @@
}
);
+ audit.define({
+ label: 'numerical typed arrays',
+ description: 'Numerical assertion unit test with typed arrays.'
+ }, function (task, should) {
+ let testValues = [1,2,3];
+ should(Uint8Array.from(testValues), 'Uint8Array').beEqualToArray(testValues);
+ should(Float32Array.from(testValues), 'Float32Array').beEqualToArray(testValues);
+ should(Float64Array.from(testValues), 'Float64Array').beEqualToArray(testValues);
+ task.done();
+ });
+
// Test Audit.loadFileFromUrl() within |should| assertion.
// See: crbug.com/701813
audit.define({
@@ -103,8 +114,8 @@
// You can enumerate tasks you want to execute in the order, or simply pass
// no argument to run all the defined tasks.
- audit.run('numerical', 'basic', 'load-file-in-should',
- 'dummy-label-string', 'dummy-label-object');
+ audit.run('numerical', 'numerical typed arrays', 'basic',
+ 'load-file-in-should', 'dummy-label-string', 'dummy-label-object');
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698