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

Unified Diff: LayoutTests/fast/mediastream/getusermedia-promise.html

Issue 1202553002: Implement navigator.mediaDevices.getUserMedia() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments (cleanup) 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
« no previous file with comments | « no previous file | Source/modules/mediastream/MediaDevices.h » ('j') | Source/modules/mediastream/MediaDevices.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/mediastream/getusermedia-promise.html
diff --git a/LayoutTests/fast/mediastream/getusermedia.html b/LayoutTests/fast/mediastream/getusermedia-promise.html
similarity index 84%
copy from LayoutTests/fast/mediastream/getusermedia.html
copy to LayoutTests/fast/mediastream/getusermedia-promise.html
index bb0ba110ee653da44541bfa79ebf5959589d28f6..e7b8af5d039dd34a941ae1772797cf3e9d88787a 100644
--- a/LayoutTests/fast/mediastream/getusermedia.html
+++ b/LayoutTests/fast/mediastream/getusermedia-promise.html
@@ -1,16 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
-<script src="../../resources/js-test.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
-description("Tests webkitGetUserMedia.");
-var stream;
-var errorArg;
+promise_test(function() {
+ assert_idl_attribute(navigator, 'mediaDevices');
+ assert_idl_attribute(navigator.mediaDevices, 'getUserMedia');
+
+ return navigator.mediaDevices.getUserMedia({audio: true}).then(function(s) {
+ assert_equals(1, s.getTracks().length);
Peter Beverloo 2015/06/23 12:44:16 nit: when using testharness.js, the expected resul
hta - Chromium 2015/06/26 09:28:59 Test harnesses seem to flip randomly between the t
+ });
+}, 'getUserMedia()');
+
+</script>
+<!--
Peter Beverloo 2015/06/23 12:44:16 Surely you don't mean to comment the rest of this
hta - Chromium 2015/06/26 09:28:59 No, I meant to convert the rest of the tests to te
function error() {
testFailed('Error callback called.');
@@ -81,5 +90,8 @@ shouldNotThrow("navigator.webkitGetUserMedia({audio:true}, gotStream1, error);")
window.jsTestIsAsync = true;
window.successfullyParsed = true;
</script>
+
+-->
+
</body>
</html>
« no previous file with comments | « no previous file | Source/modules/mediastream/MediaDevices.h » ('j') | Source/modules/mediastream/MediaDevices.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698