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

Unified Diff: runtime/observatory/tests/observatory_ui/nav/refresh/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/nav/refresh/element_test.dart
diff --git a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
index 26c3adaaa4c47a779d23dc4abb43eec5fba29ad1..05b3370ddd5d114f2d1f684422176fb50ac965d9 100644
--- a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
@@ -8,34 +8,35 @@ import 'package:observatory/src/elements/nav/refresh.dart';
main() {
NavRefreshElement.tag.ensureRegistration();
+
group('instantiation', () {
test('no parameters', () {
- final NavRefreshElement e = new NavRefreshElement();
+ final e = new NavRefreshElement();
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, isNotNull, reason: 'label is set to default');
expect(e.disabled, isFalse, reason: 'element correctly created');
});
test('label', () {
final label = 'custom-label';
- final NavRefreshElement e = new NavRefreshElement(label: label);
+ final e = new NavRefreshElement(label: label);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, isNotNull, reason: 'label is set');
expect(e.label, equals(label), reason: 'label is set to value');
});
test('not disabled', () {
- final NavRefreshElement e = new NavRefreshElement(disabled: false);
+ final e = new NavRefreshElement(disabled: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.disabled, isFalse, reason: 'element correctly created');
});
test('disabled', () {
- final NavRefreshElement e = new NavRefreshElement(disabled: true);
+ final e = new NavRefreshElement(disabled: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.disabled, isTrue, reason: 'element correctly created');
});
});
group('elements', () {
test('created after attachment', () async {
- final NavRefreshElement e = new NavRefreshElement();
+ final e = new NavRefreshElement();
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
@@ -45,7 +46,7 @@ main() {
});
test('contain custom label', () async {
final label = 'custom-label';
- final NavRefreshElement e = new NavRefreshElement(label: label);
+ final e = new NavRefreshElement(label: label);
document.body.append(e);
await e.onRendered.first;
expect(e.innerHtml.contains(label), isTrue);
@@ -55,7 +56,7 @@ main() {
test('react to label change', () async {
final label1 = 'custom-label-1';
final label2 = 'custom-label-2';
- final NavRefreshElement e = new NavRefreshElement(label: label1);
+ final e = new NavRefreshElement(label: label1);
document.body.append(e);
await e.onRendered.first;
expect(e.innerHtml.contains(label1), isTrue);
@@ -68,7 +69,7 @@ main() {
await e.onRendered.first;
});
test('react to disabled change', () async {
- final NavRefreshElement e = new NavRefreshElement(disabled: false);
+ final e = new NavRefreshElement(disabled: false);
document.body.append(e);
await e.onRendered.first;
expect(e.disabled, isFalse);

Powered by Google App Engine
This is Rietveld 408576698