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

Unified Diff: client/tests/client/html/AudioElementTest.dart

Issue 9464002: Implement automatically generated constructors for frog and dartium dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes Created 8 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: client/tests/client/html/AudioElementTest.dart
diff --git a/client/tests/client/html/AudioElementTest.dart b/client/tests/client/html/AudioElementTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..465d25e22ac31d13a97e93e5f8f22e9be999b7f3
--- /dev/null
+++ b/client/tests/client/html/AudioElementTest.dart
@@ -0,0 +1,21 @@
+#library('AudioElementTest');
+#import('../../../testing/unittest/unittest_html.dart');
+#import('dart:html');
+
+main() {
+
+ forLayoutTests();
+
+ test('constructorTest1', () {
+ var audio = new AudioElement(); // would be new Audio() in JS
Jacob 2012/03/07 03:51:27 i'd remove the // would be new Audio() in JS comm
sra1 2012/03/07 05:03:11 Done.
+ Expect.isTrue(audio != null);
+ Expect.isTrue(audio is AudioElement);
+ });
+
+ test('constructorTest2', () {
+ var audio = new AudioElement('hahaURL');
+ Expect.isTrue(audio != null);
+ Expect.isTrue(audio is AudioElement);
+ Expect.isTrue(audio.src.indexOf('hahaURL') >= 0);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698