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> |