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

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

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library("dom_attr"); 1 library dom_attr;
2 #import("dart:html"); 2 import 'dart:html';
3 #import("dart:json"); 3 import 'dart:json';
4 #import("dart:math", prefix: "Math"); 4 import 'dart:math' as Math;
5 #source("Common.dart"); 5 part 'Common.dart';
6 #source("RunnerSuite.dart"); 6 part 'RunnerSuite.dart';
7 7
8 void main() { 8 void main() {
9 final int num = 10240; 9 final int num = 10240;
10 10
11 // Try to force real results. 11 // Try to force real results.
12 var ret; 12 var ret;
13 13
14 Element elem = document.query('#test1'); 14 Element elem = document.query('#test1');
15 Element a = document.query('a'); 15 Element a = document.query('a');
16 16
17 new Suite(window, 'dom-attr') 17 new Suite(window, 'dom-attr')
18 .test('getAttribute', () { 18 .test('getAttribute', () {
19 for (int i = 0; i < num; i++) 19 for (int i = 0; i < num; i++)
20 ret = elem.$dom_getAttribute('id'); 20 ret = elem.$dom_getAttribute('id');
21 }) 21 })
22 .test('element.property', () { 22 .test('element.property', () {
23 for (int i = 0; i < num * 2; i++) 23 for (int i = 0; i < num * 2; i++)
24 ret = elem.id; 24 ret = elem.id;
25 }) 25 })
26 .test('setAttribute', () { 26 .test('setAttribute', () {
27 for (int i = 0; i < num; i++) 27 for (int i = 0; i < num; i++)
28 a.$dom_setAttribute('id', 'foo'); 28 a.$dom_setAttribute('id', 'foo');
29 }) 29 })
30 .test('element.property = value', () { 30 .test('element.property = value', () {
31 for (int i = 0; i < num; i++) 31 for (int i = 0; i < num; i++)
32 a.id = 'foo'; 32 a.id = 'foo';
33 }) 33 })
34 .end(); 34 .end();
35 } 35 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/common/common.dart ('k') | samples/third_party/dromaeo/tests/dom-attr-htmlidiomatic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698