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

Unified Diff: tests/html/audiocontext_test.dart

Issue 10451054: Fix a bug in overload dispatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« lib/dom/scripts/systemnative.py ('K') | « lib/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/audiocontext_test.dart
diff --git a/tests/html/audiocontext_test.dart b/tests/html/audiocontext_test.dart
index 6e9e02cb14af64a883852389dec419521e4434c9..7305a0f3b4c0c4d81a87a0f5453e2341a5025f51 100644
--- a/tests/html/audiocontext_test.dart
+++ b/tests/html/audiocontext_test.dart
@@ -9,7 +9,18 @@ main() {
test('constructorTest', () {
var ctx = new AudioContext();
- Expect.isTrue(ctx != null);
+ Expect.isNotNull(ctx);
Expect.isTrue(ctx is AudioContext);
});
+ test('createBuffer', () {
+ var ctx = new AudioContext();
+ ArrayBufferView arrayBufferView = new Float32Array.fromList([]);
+ try {
+ // Test that native overload is chosen correctly. Native implementation
+ // should throw 'SYNTAX_ERR' DOMException because the buffer is empty.
+ AudioBuffer buffer = ctx.createBuffer(arrayBufferView.buffer, false);
+ } catch(var e) {
+ Expect.equals(DOMException.SYNTAX_ERR, e.code);
+ }
+ });
}
« lib/dom/scripts/systemnative.py ('K') | « lib/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698