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

Side by Side Diff: frog/var_member.dart

Issue 8469016: Adding in-browser correctness testing via selenium. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** A dynamic member stub. */ 5 /** A dynamic member stub. */
6 class VarMember { 6 class VarMember {
7 final String name; 7 final String name;
8 8
9 VarMember(this.name); 9 VarMember(this.name);
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 * 'Object': function($0, capture) { 240 * 'Object': function($0, capture) {
241 * return this.noSuchMethod('addEventListener', [$0], 241 * return this.noSuchMethod('addEventListener', [$0],
242 * {'capture': capture}); 242 * {'capture': capture});
243 * } 243 * }
244 * }); 244 * });
245 */ 245 */
246 void generate(CodeWriter code) { 246 void generate(CodeWriter code) {
247 if (_fallbackStubs.length == 0) return; 247 if (_fallbackStubs.length == 0) return;
248 248
249 code.enterBlock('\$varMethod("$name", {'); 249 code.enterBlock('\$varMethod("$name", {');
250 var lastOne = _fallbackStubs[_fallbackStubs.length - 1];
250 for (var stub in _fallbackStubs) { 251 for (var stub in _fallbackStubs) {
251 code.write('"${stub.typeName}": '); 252 code.write('"${stub.typeName}": ');
252 stub.generateBody(code); 253 stub.generateBody(code);
253 code.writeln(','); 254 code.writeln(stub == lastOne ? '' : ',');
254 } 255 }
255 code.exitBlock('});'); 256 code.exitBlock('});');
256 } 257 }
257 } 258 }
258 259
259 String _getCallStubName(String name, Arguments args) { 260 String _getCallStubName(String name, Arguments args) {
260 final nameBuilder = new StringBuffer('${name}\$${args.bareCount}'); 261 final nameBuilder = new StringBuffer('${name}\$${args.bareCount}');
261 for (int i = args.bareCount; i < args.length; i++) { 262 for (int i = args.bareCount; i < args.length; i++) {
262 nameBuilder.add('\$').add(args.getName(i)); 263 nameBuilder.add('\$').add(args.getName(i));
263 } 264 }
264 return nameBuilder.toString(); 265 return nameBuilder.toString();
265 } 266 }
OLDNEW
« no previous file with comments | « frog/gen.dart ('k') | tests/language/language.status » ('j') | tools/testing/architecture.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698