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

Unified Diff: frog/frogsh

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | frog/gen.dart » ('j') | tools/testing/architecture.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frogsh
===================================================================
--- frog/frogsh (revision 1427)
+++ frog/frogsh (working copy)
@@ -1059,7 +1059,7 @@
return this._internal.get$length();
}
Object.defineProperty(ImmutableMap.prototype, "length", {
- get: ImmutableMap.prototype.get$length,
+ get: ImmutableMap.prototype.get$length
});
ImmutableMap.prototype.forEach = function(f) {
this._internal.forEach(f);
@@ -1288,7 +1288,7 @@
return this._numberOfEntries;
}
Object.defineProperty(HashMapImplementation.prototype, "length", {
- get: HashMapImplementation.prototype.get$length,
+ get: HashMapImplementation.prototype.get$length
});
HashMapImplementation.prototype.forEach = function(f) {
var length = this._keys.length;
@@ -1662,7 +1662,7 @@
return this._backingMap.get$length();
}
Object.defineProperty(HashSetImplementation.prototype, "length", {
- get: HashSetImplementation.prototype.get$length,
+ get: HashSetImplementation.prototype.get$length
});
HashSetImplementation.prototype.iterator = function() {
return new HashSetIterator$E(this);
@@ -1820,7 +1820,7 @@
return this._map.get$length();
}
Object.defineProperty(LinkedHashMapImplementation.prototype, "length", {
- get: LinkedHashMapImplementation.prototype.get$length,
+ get: LinkedHashMapImplementation.prototype.get$length
});
LinkedHashMapImplementation.prototype.isEmpty = function() {
return this.get$length() == 0;
@@ -2043,7 +2043,7 @@
return counter;
}
Object.defineProperty(DoubleLinkedQueue.prototype, "length", {
- get: DoubleLinkedQueue.prototype.get$length,
+ get: DoubleLinkedQueue.prototype.get$length
});
DoubleLinkedQueue.prototype.isEmpty = function() {
return (this._sentinel._next === this._sentinel);
@@ -2197,7 +2197,7 @@
return this._length;
}
Object.defineProperty(StringBufferImpl.prototype, "length", {
- get: StringBufferImpl.prototype.get$length,
+ get: StringBufferImpl.prototype.get$length
});
StringBufferImpl.prototype.isEmpty = function() {
return this._length == 0;
@@ -10640,7 +10640,8 @@
if ($notnull_bool(property._provideFieldSyntax)) {
this.writer.enterBlock('Object.defineProperty(' + ('' + property.declaringType.get$jsname() + '.prototype, "' + property.get$jsname() + '", {'));
if ($notnull_bool(property.getter != null)) {
- this.writer.writeln(('get: ' + property.declaringType.get$jsname() + '.prototype.' + property.getter.get$jsname() + ','));
+ this.writer.write(('get: ' + property.declaringType.get$jsname() + '.prototype.' + property.getter.get$jsname() + ''));
+ this.writer.writeln($notnull_bool(property.setter == null) ? '' : ',');
}
if ($notnull_bool(property.setter != null)) {
this.writer.writeln(('set: ' + property.declaringType.get$jsname() + '.prototype.' + property.setter.get$jsname() + ''));
@@ -10927,7 +10928,7 @@
defWriter.writeln('var \$this = this; // closure support');
}
if ($notnull_bool(this._usedTemps.get$length() > 0 || this._freeTemps.length > 0)) {
- $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.dart", 694, 14);
+ $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.dart", 697, 14);
this._freeTemps.addAll(this._usedTemps);
this._freeTemps.sort((function (x, y) {
return x.compareTo(y);
@@ -12065,7 +12066,7 @@
MethodGenerator.prototype.visitLiteralExpression = function(node) {
var $0;
var type = node.type.type;
- $assert($ne(type, null), "type != null", "gen.dart", 2072, 12);
+ $assert($ne(type, null), "type != null", "gen.dart", 2075, 12);
if ($notnull_bool(!!(($0 = node.value) && $0.is$List))) {
var items = [];
var $list = node.value;
@@ -12135,7 +12136,7 @@
return this.values.length;
}
Object.defineProperty(Arguments.prototype, "length", {
- get: Arguments.prototype.get$length,
+ get: Arguments.prototype.get$length
});
Arguments.prototype.getName = function(i) {
return this.nodes.$index(i).label.name;
@@ -18501,7 +18502,7 @@
return this.genericType.getOrMakeConcreteType(typeArgs);
}
ConcreteType.prototype.get$parent = function() {
- return this.genericType.parent;
+ return this.genericType.get$parent();
}
ConcreteType.prototype.get$interfaces = function() {
if ($notnull_bool(this._interfaces == null && this.genericType.interfaces != null)) {
@@ -18612,8 +18613,12 @@
DefinedType.prototype.set$definition = function(value) { return this.definition = value; };
DefinedType.prototype.get$library = function() { return this.library; };
DefinedType.prototype.get$isClass = function() { return this.isClass; };
-DefinedType.prototype.get$parent = function() { return this.parent; };
-DefinedType.prototype.set$parent = function(value) { return this.parent = value; };
+DefinedType.prototype.get$parent = function() {
+ return this._parent;
+}
+DefinedType.prototype.set$parent = function(p) {
+ return this._parent = p;
+}
DefinedType.prototype.get$interfaces = function() { return this.interfaces; };
DefinedType.prototype.set$interfaces = function(value) { return this.interfaces = value; };
DefinedType.prototype.get$typeParameters = function() { return this.typeParameters; };
@@ -18629,7 +18634,7 @@
DefinedType.prototype.get$isNativeType = function() { return this.isNativeType; };
DefinedType.prototype.set$isNativeType = function(value) { return this.isNativeType = value; };
DefinedType.prototype.setDefinition = function(def) {
- $assert(this.definition == null, "definition == null", "type.dart", 558, 12);
+ $assert(this.definition == null, "definition == null", "type.dart", 563, 12);
this.definition = def;
if ($notnull_bool((this.definition instanceof TypeDefinition) && this.definition.get$nativeType() != null)) {
this.isNativeType = true;
@@ -18710,7 +18715,7 @@
}
this._lazyGenMethods = null;
}
- if ($notnull_bool(this.parent != null)) this.parent.markUsed();
+ if ($notnull_bool(this.get$parent() != null)) this.get$parent().markUsed();
}
DefinedType.prototype.genMethod = function(method) {
if ($notnull_bool(this.isUsed)) {
@@ -18736,7 +18741,7 @@
return interfaces;
}
DefinedType.prototype.addDirectSubtype = function(type) {
- $assert(this._subtypes == null, "_subtypes == null", "type.dart", 674, 12);
+ $assert(this._subtypes == null, "_subtypes == null", "type.dart", 679, 12);
this.directSubtypes.add(type);
}
DefinedType.prototype.get$subtypes = function() {
@@ -18755,7 +18760,7 @@
DefinedType.prototype._cycleInClassExtends = function() {
var seen = new HashSetImplementation();
seen.add(this);
- var ancestor = this.parent;
+ var ancestor = this.get$parent();
while ($notnull_bool($ne(ancestor, null))) {
if ($notnull_bool(ancestor === this)) {
return true;
@@ -18808,20 +18813,20 @@
var extendsTypeRef = typeDef.extendsTypes.$index(0);
if ($notnull_bool((extendsTypeRef instanceof GenericTypeReference))) {
var g = (extendsTypeRef && extendsTypeRef.is$GenericTypeReference());
- this.parent = this.resolveType(g.baseType, true);
+ this.set$parent(this.resolveType(g.baseType, true));
}
- this.parent = this.resolveType((extendsTypeRef && extendsTypeRef.is$TypeReference()), true);
- if ($notnull_bool(!$notnull_bool(this.parent.get$isClass()))) {
+ this.set$parent(this.resolveType((extendsTypeRef && extendsTypeRef.is$TypeReference()), true));
+ if ($notnull_bool(!$notnull_bool(this.get$parent().get$isClass()))) {
world.error('class may not extend an interface - use implements', typeDef.extendsTypes.$index(0).get$span());
}
- this.parent.addDirectSubtype(this);
+ this.get$parent().addDirectSubtype(this);
if ($notnull_bool(this._cycleInClassExtends())) {
world.error(('class "' + this.name + '" has a cycle in its inheritance chain'), extendsTypeRef.get$span());
}
}
else {
if ($notnull_bool(!$notnull_bool(this.get$isObject()))) {
- this.parent = world.objectType;
+ this.set$parent(world.objectType);
}
}
this.interfaces = this._resolveInterfaces(typeDef.implementsTypes);
@@ -19005,8 +19010,8 @@
}
DefinedType.prototype.getMemberInParents = function(memberName) {
if ($notnull_bool(this.isClass)) {
- if ($notnull_bool(this.parent != null)) {
- return this.parent.getMember(memberName);
+ if ($notnull_bool(this.get$parent() != null)) {
+ return this.get$parent().getMember(memberName);
}
else if ($notnull_bool(this.get$isObject())) {
if ($notnull_bool(memberName == '\$ne')) {
@@ -19164,7 +19169,7 @@
return this;
}
DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) {
- $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1156, 12);
+ $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1161, 12);
var names = [this.name];
var typeMap = $map([]);
for (var i = 0;
@@ -19182,7 +19187,7 @@
return ret;
}
DefinedType.prototype.getCallStub = function(args) {
- $assert(this.get$isFunction(), "isFunction", "type.dart", 1176, 12);
+ $assert(this.get$isFunction(), "isFunction", "type.dart", 1181, 12);
var name = _getCallStubName('call', args);
if ($notnull_bool(this.varStubs == null)) this.varStubs = $map([]);
var stub = this.varStubs.$index(name);
@@ -20084,6 +20089,11 @@
this.showInfo = true;
continue loop;
+ case '--suppress_warnings':
+
+ this.showWarnings = false;
+ continue loop;
+
case '--throw_on_errors':
this.throwOnErrors = true;
@@ -20304,12 +20314,13 @@
VarMethodSet.prototype.generate = function(code) {
if ($notnull_bool(this._fallbackStubs.length == 0)) return;
code.enterBlock(('\$varMethod("' + this.name + '", {'));
+ var lastOne = this._fallbackStubs.$index(this._fallbackStubs.length - 1);
var $list = this._fallbackStubs;
for (var $i = 0;$i < $list.length; $i++) {
var stub = $list.$index($i);
code.write(('"' + stub.get$typeName() + '": '));
stub.generateBody(code);
- code.writeln(',');
+ code.writeln($notnull_bool($eq(stub, lastOne)) ? '' : ',');
}
code.exitBlock('});');
}
« no previous file with comments | « no previous file | frog/gen.dart » ('j') | tools/testing/architecture.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698