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

Unified Diff: runtime/observatory/tests/observatory_ui/script_ref/element_test.dart

Issue 2211603002: Centralized event streams (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 months 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
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;

Powered by Google App Engine
This is Rietveld 408576698