anchor.diff:          return false;
         }
   
  -      List expectedAttrKeys = new List.from(expected.attributes.keys);
  +      var expectedAttrKeys = expected.attributes.keys.toList();
         expectedAttrKeys.sort();
   
  -      List actualAttrKeys = new List.from(actual.attributes.keys);
  +      var actualAttrKeys = actual.attributes.keys.toList();
         actualAttrKeys.sort();
   
  -      for (int attrNum in new List.generate(actualAttrKeys.length, (i) => i)) {
  +      for (var attrNum = 0; attrNum < actualAttrKeys.length; attrNum++) {
           var expectedAttrKey = expectedAttrKeys[attrNum];
           var actualAttrKey = actualAttrKeys[attrNum];
   
  
positive.code: }
  
  /// Compare two DOM trees for equality.
  bool compareHtml(List<Element> expectedEls, List<Element> actualEls) {
    if (expectedEls.length != actualEls.length) {
      return false;
    }
  
    for (int childNum in new List.generate(expectedEls.length, (i) => i)) {
      var expected = expectedEls[childNum];
      var actual = actualEls[childNum];
  
      if (expected.runtimeType != actual.runtimeType) {
        return false;
  
negative.code:       }
      }
  
      var childrenEqual = compareHtml(expected.children, actual.children);
  
      if (!childrenEqual) {
        return false;
  