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

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

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page Created 4 years, 3 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/curly_block/element_test.dart
diff --git a/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart b/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
index 139e235bd1115c9573787ecde7e6c46812fe296d..54d50b995d311c9591706294e5595ab3a3de25e3 100644
--- a/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
@@ -69,19 +69,20 @@ main() {
});
test('elements created', () async {
final e = new CurlyBlockElement();
- expect(e.shadowRoot, isNotNull, reason: 'shadowRoot is created');
+ expect(e.children.length, isZero, reason: 'is empty');
document.body.append(e);
await e.onRendered.first;
- expect(e.shadowRoot.children.length, isNonZero,
- reason: 'shadowRoot has elements');
+ expect(e.children.length, isNonZero,
+ reason: 'has elements');
e.remove();
await e.onRendered.first;
- expect(e.shadowRoot.children.length, isZero, reason: 'shadowRoot is empty');
+ expect(e.children.length, isZero, reason: 'is empty');
});
group('content', () {
CurlyBlockElement e;
setUp(() async {
e = new CurlyBlockElement();
+ e.content = [document.createElement('content')];
document.body.append(e);
await e.onRendered.first;
});
@@ -89,56 +90,56 @@ main() {
e.remove();
});
test('toggles visibility', () async {
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.toggle();
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNotNull);
+ expect(e.querySelector('content'), isNotNull);
e.toggle();
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.remove();
});
test('toggles visibility (manually)', () async {
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.expanded = true;
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNotNull);
+ expect(e.querySelector('content'), isNotNull);
e.expanded = false;
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.remove();
});
test('does not toggle if disabled', () async {
e.disabled = true;
await e.onRendered.first;
expect(e.expanded, isFalse);
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.toggle();
await e.onRendered.first;
expect(e.expanded, isFalse);
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.disabled = false;
e.toggle();
await e.onRendered.first;
expect(e.expanded, isTrue);
- expect(e.shadowRoot.querySelector('content'), isNotNull);
+ expect(e.querySelector('content'), isNotNull);
e.disabled = true;
e.toggle();
await e.onRendered.first;
expect(e.expanded, isTrue);
- expect(e.shadowRoot.querySelector('content'), isNotNull);
+ expect(e.querySelector('content'), isNotNull);
e.remove();
});
test('toggles visibility (manually) if disabled', () async {
e.disabled = true;
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.expanded = true;
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNotNull);
+ expect(e.querySelector('content'), isNotNull);
e.expanded = false;
await e.onRendered.first;
- expect(e.shadowRoot.querySelector('content'), isNull);
+ expect(e.querySelector('content'), isNull);
e.remove();
});
});

Powered by Google App Engine
This is Rietveld 408576698