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

Unified Diff: LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html

Issue 1184743002: Implement enumerateDevices() according to spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix expected output of global interface listing test Created 5 years, 6 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: LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html
diff --git a/LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html b/LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html
new file mode 100644
index 0000000000000000000000000000000000000000..8549b6a8a4c03c0f14265849e93f73ebfa32f379
--- /dev/null
+++ b/LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
Peter Beverloo 2015/06/18 14:28:50 nit: Please use <!doctype html> (or <!DOCTYPE HTM
+<title>mytest</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+// Tests that the enumerateDevices() returns an array of at least
+// one object with the correct fields
+promise_test(function() {
+ assert_idl_attribute(navigator, 'mediaDevices');
+ assert_idl_attribute(navigator.mediaDevices, 'enumerateDevices');
+
+ return navigator.mediaDevices.enumerateDevices().then(function(d) {
+ assert_true(d.length > 0);
+ assert_idl_attribute(d[0], 'kind');
+ assert_idl_attribute(d[0], 'deviceId');
+ assert_idl_attribute(d[0], 'label');
+ assert_idl_attribute(d[0], 'groupId');
+ return Promise.resolve();
+ });
+}, 'enumerateDevices()');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698