import 'dart:async';
import 'dart:html';

import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';

test() async {
  var list = await window.navigator.mediaDevices.enumerateDevices();
  Expect.isTrue(list is List<dynamic>, "Expected list to be List<dynamic>");
}

void main() {
  asyncStart();
  test().then((_) => asyncEnd());
}

Add test to enumerate media devices
Add test to enumerate media devices

Bug: https://github.com/dart-lang/sdk/issues/39627

Enumerating media devices gives back a cast error in html_dart2js. This
test should fail and the cast should be fixed such that it passes.

Change-Id: Ie2502f265448d078578113cbea57dd81d20015c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128104
Commit-Queue: Srujan Gaddam <4175f2f2dd3cde6c8ffb10fc9674dc09abf813fe@google.com>
Reviewed-by: Sigmund Cherem <beaea8fd7d2a56555046ba4f362c8a93e3938576@google.com>
