| Index: runtime/observatory/tests/observatory_ui/source_link/element_test.dart
|
| diff --git a/runtime/observatory/tests/observatory_ui/source_link/element_test.dart b/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
|
| index bd096b8f51ab3b47abe137a801939852ecceb338..38218f3322e33d0a12b02e3819cd907a30a6aa33 100644
|
| --- a/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
|
| +++ b/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
|
| @@ -17,21 +17,23 @@ main() {
|
| tokenToLine: (int token) => 1, tokenToCol: (int token) => 2);
|
| final location = new SourceLocationMock(script: script, tokenPos: 0,
|
| endTokenPos: 1);
|
| + final repository = new ScriptRepositoryMock();
|
| test('instantiation', () {
|
| - final e = new SourceLinkElement(isolate, location,
|
| - new ScriptRepositoryMock());
|
| + final e = new SourceLinkElement(isolate, location, repository);
|
| expect(e, isNotNull, reason: 'element correctly created');
|
| expect(e.isolate, equals(isolate));
|
| expect(e.location, equals(location));
|
| });
|
| test('elements created after attachment', () async {
|
| bool rendered = false;
|
| - final e = new SourceLinkElement(isolate, location,
|
| - new ScriptRepositoryMock(getter: expectAsync((String id) async {
|
| - expect(rendered, isFalse);
|
| - expect(id, equals(script_id));
|
| - return script;
|
| - }, count: 1)));
|
| + final repository = new ScriptRepositoryMock(
|
| + getter: expectAsync((isolate, id) async {
|
| + expect(rendered, isFalse);
|
| + expect(id, equals(script_id));
|
| + return script;
|
| + }, count: 1)
|
| + );
|
| + final e = new SourceLinkElement(isolate, location, repository);
|
| document.body.append(e);
|
| await e.onRendered.first;
|
| rendered = true;
|
|
|