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

Unified Diff: LayoutTests/fast/mediastream/getMediaDevices.html

Issue 145583015: MediaStream API: Implement Navigator.getMediaDevices Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments and added a simple test Created 6 years, 11 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 | LayoutTests/fast/mediastream/getMediaDevices-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/getMediaDevices-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698