mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Fix VM connect element test
BUG= Review URL: https://codereview.chromium.org/2348313002 .
This commit is contained in:
parent
e24939f8d6
commit
699e328105
|
@ -98,7 +98,8 @@ class VMConnectElement extends HtmlElement implements Renderable {
|
|||
..children = _targets.list().map((target) {
|
||||
final ObservatoryApplication app =
|
||||
ObservatoryApplication.app;
|
||||
final bool current = app.isConnectedVMTarget(target);
|
||||
final bool current = (app != null) ?
|
||||
app.isConnectedVMTarget(target) : false;
|
||||
return new LIElement()
|
||||
..children = [
|
||||
new VMConnectTargetElement(target,
|
||||
|
|
|
@ -45,7 +45,6 @@ main() {
|
|||
document.body.append(e);
|
||||
await e.onRendered.first;
|
||||
expect(targets.listInvoked, isTrue, reason: 'should invoke list()');
|
||||
expect(targets.currentInvoked, isTrue, reason: 'should invoke current');
|
||||
expect(e.children.length, isNonZero, reason: 'has elements');
|
||||
expect(e.querySelectorAll(nTag).length, equals(1));
|
||||
expect(e.querySelectorAll(tTag).length, equals(2));
|
||||
|
@ -72,7 +71,7 @@ main() {
|
|||
});
|
||||
group('invokes', () {
|
||||
test('add on click', () async {
|
||||
final address = 'ws://host:1234';
|
||||
final address = 'ws://host:1234/ws';
|
||||
final list = <TargetMock>[const TargetMock(name: 't-1')];
|
||||
final targets = new TargetRepositoryMock(list: list,
|
||||
add: expectAsync((String val) {
|
||||
|
|
Loading…
Reference in a new issue