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

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

Issue 9963004: Use the new syntax for native methods that are just renames of other native methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ready to review... Sra's change actually fixed a failing test instead of causing a new test to fail! Created 8 years, 8 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 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('runner.dart'); 4 #import('runner.dart');
5 5
6 void main() { 6 void main() {
7 final int num = 40; 7 final int num = 40;
8 8
9 // Try to force real results. 9 // Try to force real results.
10 var ret; 10 var ret;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }) 67 })
68 .test('getElementsByTagName(*)', () { 68 .test('getElementsByTagName(*)', () {
69 for (int i = 0; i < num; i++) { 69 for (int i = 0; i < num; i++) {
70 NodeList elems = document.$dom_getElementsByTagName('*'); 70 NodeList elems = document.$dom_getElementsByTagName('*');
71 ret = elems.last().$dom_nodeType; 71 ret = elems.last().$dom_nodeType;
72 } 72 }
73 }) 73 })
74 .test('getElementsByTagName (not in document)', () { 74 .test('getElementsByTagName (not in document)', () {
75 for (int i = 0; i < num; i++) { 75 for (int i = 0; i < num; i++) {
76 NodeList elems = document.$dom_getElementsByTagName('strong'); 76 NodeList elems = document.$dom_getElementsByTagName('strong');
77 ret = elems.last().$dom_nodeType; 77 ret = elems.length == 0;
78 } 78 }
79 }) 79 })
80 .test('getElementsByName', () { 80 .test('getElementsByName', () {
81 for (int i = 0; i < num * 20; i++) { 81 for (int i = 0; i < num * 20; i++) {
82 NodeList elems = document.$dom_getElementsByName('test$num'); 82 NodeList elems = document.$dom_getElementsByName('test$num');
83 ret = elems[elems.length-1].$dom_nodeType; 83 ret = elems[elems.length-1].$dom_nodeType;
84 elems = document.$dom_getElementsByName('test$num'); 84 elems = document.$dom_getElementsByName('test$num');
85 ret = elems[elems.length-1].$dom_nodeType; 85 ret = elems[elems.length-1].$dom_nodeType;
86 elems = document.$dom_getElementsByName('test$num'); 86 elems = document.$dom_getElementsByName('test$num');
87 ret = elems[elems.length-1].$dom_nodeType; 87 ret = elems[elems.length-1].$dom_nodeType;
88 elems = document.$dom_getElementsByName('test$num'); 88 elems = document.$dom_getElementsByName('test$num');
89 ret = elems[elems.length-1].$dom_nodeType; 89 ret = elems[elems.length-1].$dom_nodeType;
90 } 90 }
91 }) 91 })
92 .test('getElementsByName (not in document)', () { 92 .test('getElementsByName (not in document)', () {
93 for (int i = 0; i < num * 20; i++) { 93 for (int i = 0; i < num * 20; i++) {
94 ret = document.$dom_getElementsByName('test').length == 0; 94 ret = document.$dom_getElementsByName('test').length == 0;
95 ret = document.$dom_getElementsByName('test').length == 0; 95 ret = document.$dom_getElementsByName('test').length == 0;
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 } 99 }
100 }) 100 })
101 .end(); 101 .end();
102 } 102 }
OLDNEW
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | samples/third_party/dromaeo/tests/dom-query-htmlidiomatic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698