I'll refactor the test to clarify, I believe that the ordering is correct.

The simplified version would be along the lines of:
```
var node = new ImageElement()..attributes['src'] = 'foo.png';
AbsoluteUris.resolveDom(node, originalBase);
expect(node.attributes['src']).toEqual('foo/foo.png');
```

But when porting the Polymer code, I dropped the portion that maintains a relative path post-transformation- their implementation was non-trivial and appeared to be buggy. A correct implementation is in the path package, but did not seem worth the added dependency. So the current result would look more like:
```
expect(node.attributes['src']).toEqual(local.resolve('foo/foo.png').toString());
```