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

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

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. 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_query"); 1 #library("dom_query");
2 #import("dart:html"); 2 #import("dart:html");
3 #import('../common/common.dart'); 3 #import('../common/common.dart');
4 #import("dart:math", prefix: "Math"); 4 #import("dart:math", prefix: "Math");
5 #source("Common.dart"); 5 #source("Common.dart");
6 #source("RunnerSuite.dart"); 6 #source("RunnerSuite.dart");
7 7
8 void main() { 8 void main() {
9 final int num = 40; 9 final int num = 40;
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ret = document.$dom_getElementById('testB'); 45 ret = document.$dom_getElementById('testB');
46 ret = document.$dom_getElementById('testC'); 46 ret = document.$dom_getElementById('testC');
47 ret = document.$dom_getElementById('testD'); 47 ret = document.$dom_getElementById('testD');
48 ret = document.$dom_getElementById('testE'); 48 ret = document.$dom_getElementById('testE');
49 ret = document.$dom_getElementById('testF'); 49 ret = document.$dom_getElementById('testF');
50 } 50 }
51 }) 51 })
52 .test('getElementsByTagName(div)', () { 52 .test('getElementsByTagName(div)', () {
53 for (int i = 0; i < num; i++) { 53 for (int i = 0; i < num; i++) {
54 List<Element> elems = document.$dom_getElementsByTagName('div'); 54 List<Element> elems = document.$dom_getElementsByTagName('div');
55 ret = elems.last().$dom_nodeType; 55 ret = elems.last.$dom_nodeType;
56 } 56 }
57 }) 57 })
58 .test('getElementsByTagName(p)', () { 58 .test('getElementsByTagName(p)', () {
59 for (int i = 0; i < num; i++) { 59 for (int i = 0; i < num; i++) {
60 List<Element> elems = document.$dom_getElementsByTagName('p'); 60 List<Element> elems = document.$dom_getElementsByTagName('p');
61 ret = elems.last().$dom_nodeType; 61 ret = elems.last.$dom_nodeType;
62 } 62 }
63 }) 63 })
64 .test('getElementsByTagName(a)', () { 64 .test('getElementsByTagName(a)', () {
65 for (int i = 0; i < num; i++) { 65 for (int i = 0; i < num; i++) {
66 List<Element> elems = document.$dom_getElementsByTagName('a'); 66 List<Element> elems = document.$dom_getElementsByTagName('a');
67 ret = elems.last().$dom_nodeType; 67 ret = elems.last.$dom_nodeType;
68 } 68 }
69 }) 69 })
70 .test('getElementsByTagName(*)', () { 70 .test('getElementsByTagName(*)', () {
71 for (int i = 0; i < num; i++) { 71 for (int i = 0; i < num; i++) {
72 List<Element> elems = document.$dom_getElementsByTagName('*'); 72 List<Element> elems = document.$dom_getElementsByTagName('*');
73 ret = elems.last().$dom_nodeType; 73 ret = elems.last.$dom_nodeType;
74 } 74 }
75 }) 75 })
76 .test('getElementsByTagName (not in document)', () { 76 .test('getElementsByTagName (not in document)', () {
77 for (int i = 0; i < num; i++) { 77 for (int i = 0; i < num; i++) {
78 List<Element> elems = document.$dom_getElementsByTagName('strong'); 78 List<Element> elems = document.$dom_getElementsByTagName('strong');
79 ret = elems.length == 0; 79 ret = elems.length == 0;
80 } 80 }
81 }) 81 })
82 .test('getElementsByName', () { 82 .test('getElementsByName', () {
83 for (int i = 0; i < num * 20; i++) { 83 for (int i = 0; i < num * 20; i++) {
(...skipping 11 matching lines...) Expand all
95 for (int i = 0; i < num * 20; i++) { 95 for (int i = 0; i < num * 20; i++) {
96 ret = document.$dom_getElementsByName('test').length == 0; 96 ret = document.$dom_getElementsByName('test').length == 0;
97 ret = document.$dom_getElementsByName('test').length == 0; 97 ret = document.$dom_getElementsByName('test').length == 0;
98 ret = document.$dom_getElementsByName('test').length == 0; 98 ret = document.$dom_getElementsByName('test').length == 0;
99 ret = document.$dom_getElementsByName('test').length == 0; 99 ret = document.$dom_getElementsByName('test').length == 0;
100 ret = document.$dom_getElementsByName('test').length == 0; 100 ret = document.$dom_getElementsByName('test').length == 0;
101 } 101 }
102 }) 102 })
103 .end(); 103 .end();
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698