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

Unified Diff: samples/third_party/dromaeo/tests/dom-attr-html.dart

Issue 9732019: dart:html perf optimization based on runing Dromaeo benchmarks (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: samples/third_party/dromaeo/tests/dom-attr-html.dart
diff --git a/samples/third_party/dromaeo/tests/dom-attr-html.dart b/samples/third_party/dromaeo/tests/dom-attr-html.dart
index ba3c11d7072067149b66f2ffc7af5917516e6377..653a84d07aa8d5a0baa7b62bd025518a8cb34d4c 100644
--- a/samples/third_party/dromaeo/tests/dom-attr-html.dart
+++ b/samples/third_party/dromaeo/tests/dom-attr-html.dart
@@ -1,8 +1,6 @@
-#library("dom_attr_html");
+#library("dom_attr");
#import("dart:html");
-#import("dart:json");
-#source("Common.dart");
-#source("RunnerSuite.dart");
+#import('runner.dart');
void main() {
final int num = 10240;
@@ -11,12 +9,12 @@ void main() {
var ret;
Element elem = document.query('#test1');
- Element a = document.queryAll('a')[0];
+ Element a = document.query('a');
new Suite(window, 'dom-attr')
.test('getAttribute', () {
for (int i = 0; i < num; i++)
- ret = elem.attributes['id'];
+ ret = elem.$dom_getAttribute('id');
})
.test('element.property', () {
for (int i = 0; i < num * 2; i++)
@@ -24,7 +22,7 @@ void main() {
})
.test('setAttribute', () {
for (int i = 0; i < num; i++)
- a.attributes['id'] = 'foo';
+ a.$dom_setAttribute('id', 'foo');
})
.test('element.property = value', () {
for (int i = 0; i < num; i++)

Powered by Google App Engine
This is Rietveld 408576698