Index: LayoutTests/fast/mediastream/getMediaDevices.html |
diff --git a/LayoutTests/fast/mediastream/RTCPeerConnection-state.html b/LayoutTests/fast/mediastream/getMediaDevices.html |
similarity index 34% |
copy from LayoutTests/fast/mediastream/RTCPeerConnection-state.html |
copy to LayoutTests/fast/mediastream/getMediaDevices.html |
index 0235b40d020c0173013ddb8a4aa23c49de672465..32faaaef50fa73a768f86d4a753a8f13b25bc340 100644 |
--- a/LayoutTests/fast/mediastream/RTCPeerConnection-state.html |
+++ b/LayoutTests/fast/mediastream/getMediaDevices.html |
@@ -5,21 +5,22 @@ |
</head> |
<body> |
<script> |
-description("Tests the RTCPeerConnection states."); |
+description("Tests navigator.getMediaDevices"); |
-var pc = null; |
+var devices = null; |
-function stateChanged() |
-{ |
- testPassed("stateChanged was called"); |
- shouldBeEqualToString('pc.signalingState', 'closed'); |
+function devicesCallback(d) { |
+ devices = d; |
+ testPassed('Devices returned.'); |
+ shouldBe('devices.length', '3'); |
+ shouldBeEqualToString('devices[0].kind', 'audioinput'); |
+ shouldBeEqualToString('devices[1].kind', 'audiooutput'); |
+ shouldBeEqualToString('devices[2].kind', 'videoinput'); |
finishJSTest(); |
} |
-shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);'); |
-shouldBeEqualToString('pc.signalingState', 'stable'); |
-pc.onsignalingstatechange = stateChanged; |
-pc.close(); |
+shouldNotThrow("navigator.getMediaDevices(devicesCallback);"); |
+testPassed('After getMediaDevices'); |
window.jsTestIsAsync = true; |
window.successfullyParsed = true; |