Index: samples/third_party/dromaeo/tests/dom-attr-htmlfast.dart |
diff --git a/samples/third_party/dromaeo/tests/dom-attr-htmlfast.dart b/samples/third_party/dromaeo/tests/dom-attr-htmlfast.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..653a84d07aa8d5a0baa7b62bd025518a8cb34d4c |
--- /dev/null |
+++ b/samples/third_party/dromaeo/tests/dom-attr-htmlfast.dart |
@@ -0,0 +1,32 @@ |
+#library("dom_attr"); |
+#import("dart:html"); |
+#import('runner.dart'); |
+ |
+void main() { |
+ final int num = 10240; |
+ |
+ // Try to force real results. |
+ var ret; |
+ |
+ Element elem = document.query('#test1'); |
+ Element a = document.query('a'); |
+ |
+ new Suite(window, 'dom-attr') |
+ .test('getAttribute', () { |
+ for (int i = 0; i < num; i++) |
+ ret = elem.$dom_getAttribute('id'); |
+ }) |
+ .test('element.property', () { |
+ for (int i = 0; i < num * 2; i++) |
+ ret = elem.id; |
+ }) |
+ .test('setAttribute', () { |
+ for (int i = 0; i < num; i++) |
+ a.$dom_setAttribute('id', 'foo'); |
+ }) |
+ .test('element.property = value', () { |
+ for (int i = 0; i < num; i++) |
+ a.id = 'foo'; |
+ }) |
+ .end(); |
+} |