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

Unified Diff: runtime/observatory/tests/observatory_ui/nav/isolate-menu/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/nav/isolate-menu/element_test.dart
diff --git a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
index 3241c45b504409ab8b370a57d36d793d0f138313..5d40f27e15e124d60b5d5015c8f7916aa4f4f64f 100644
--- a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
@@ -4,14 +4,13 @@
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/src/elements/nav/menu.dart';
import 'package:observatory/src/elements/nav/isolate_menu.dart';
import '../../mocks.dart';
main() {
NavIsolateMenuElement.tag.ensureRegistration();
- final tag = NavMenuElement.tag.name;
+ final tag = '.nav-menu_label > a';
EventRepositoryMock events;
final ref = const IsolateRefMock(id: 'i-id', name: 'old-name');
@@ -35,10 +34,10 @@ main() {
final e = new NavIsolateMenuElement(ref, events);
document.body.append(e);
await e.onRendered.first;
- expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
+ expect(e.children.length, isNonZero, reason: 'has elements');
e.remove();
await e.onRendered.first;
- expect(e.shadowRoot.children.length, isZero, reason: 'is empty');
+ expect(e.children.length, isZero, reason: 'is empty');
});
group('updates', () {
test('are correctly listen', () async {
@@ -55,14 +54,11 @@ main() {
final e = new NavIsolateMenuElement(ref, events);
document.body.append(e);
await e.onRendered.first;
- expect((e.shadowRoot.querySelector(tag) as NavMenuElement)
- .label.contains(ref.name), isTrue);
+ expect(e.querySelector(tag).text.contains(ref.name), isTrue);
events.add(new IsolateUpdateEventMock(isolate: obj));
await e.onRendered.first;
- expect((e.shadowRoot.querySelector(tag) as NavMenuElement)
- .label.contains(ref.name), isFalse);
- expect((e.shadowRoot.querySelector(tag) as NavMenuElement)
- .label.contains(obj.name), isTrue);
+ expect(e.querySelector(tag).text.contains(ref.name), isFalse);
+ expect(e.querySelector(tag).text.contains(obj.name), isTrue);
e.remove();
});
});

Powered by Google App Engine
This is Rietveld 408576698