Index: runtime/observatory/tests/observatory_ui/script_ref/element_test.dart |
diff --git a/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart |
index eda7d49a47e84df1ed7da36f3a1c789ec8c6a37a..6dc2b8401081f6e6a6961856fc4d84b05d233692 100644 |
--- a/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart |
+++ b/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart |
@@ -3,32 +3,31 @@ |
// BSD-style license that can be found in the LICENSE file. |
import 'dart:html'; |
import 'package:unittest/unittest.dart'; |
-import 'package:observatory/mocks.dart'; |
-import 'package:observatory/models.dart' as M; |
import 'package:observatory/src/elements/script_ref.dart'; |
+import '../mocks.dart'; |
main() { |
ScriptRefElement.tag.ensureRegistration(); |
- final M.IsolateRef isolate = const IsolateRefMock(id: 'isolate-id'); |
- final M.ScriptRef ref = const ScriptRefMock(id: 'script-id', |
- uri: 'package/filename.dart'); |
+ const isolate = const IsolateRefMock(id: 'isolate-id'); |
+ const file = 'filename.dart'; |
+ const ref = const ScriptRefMock(id: 'script-id', uri: 'package/$file'); |
group('instantiation', () { |
test('no position', () { |
- final ScriptRefElement e = new ScriptRefElement(isolate, ref); |
+ final e = new ScriptRefElement(isolate, ref); |
expect(e, isNotNull, reason: 'element correctly created'); |
expect(e.isolate, equals(isolate)); |
expect(e.script, equals(ref)); |
}); |
}); |
test('elements created after attachment', () async { |
- final ScriptRefElement e = new ScriptRefElement(isolate, ref); |
+ final e = new ScriptRefElement(isolate, ref); |
document.body.append(e); |
await e.onRendered.first; |
expect(e.children.length, isNonZero, reason: 'has elements'); |
expect(e.innerHtml.contains(isolate.id), isTrue, |
reason: 'no message in the component'); |
- expect(e.innerHtml.contains('filename.dart'), isTrue, |
+ expect(e.innerHtml.contains(file), isTrue, |
reason: 'no message in the component'); |
e.remove(); |
await e.onRendered.first; |