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

Unified Diff: LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html

Issue 16778002: MediaStream API: Changing the device enumeration to be async (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Win fix Created 7 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/MediaStreamTrack-getSourceInfos.html
diff --git a/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html b/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html
index a4f7ad1229df0aa98080178acfc7abadf32534eb..d92745fbf7a9f439a54cf2521f68423bbf422304 100644
--- a/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html
+++ b/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html
@@ -27,19 +27,32 @@ function getUserMedia(constraints, callback) {
}
}
-function gotStream(s) {
- shouldNotThrow('sources = MediaStreamTrack.getSourceInfos();');
+function gotSourceInfos2(s) {
+ testPassed('gotSourceInfos2 was called.');
+ sources = s;
shouldBeTrue('sources.length > 0');
shouldBeTrue('sources[0].id === previousId');
shouldBeTrue('sources[0].label.length > 0');
+
finishJSTest();
}
-shouldNotThrow('sources = MediaStreamTrack.getSourceInfos();');
-shouldBeTrue('sources.length > 0');
-previousId = sources[0].id;
+function gotStream(s) {
+ testPassed('gotStream was called.');
+
+ shouldNotThrow('MediaStreamTrack.getSources(gotSourceInfos2);');
+}
+
+function gotSourceInfos1(s) {
+ testPassed('gotSourceInfos1 was called.');
+ sources = s;
+ shouldBeTrue('sources.length > 0');
+ previousId = sources[0].id;
+
+ getUserMedia({audio:true, video:true}, gotStream);
+}
-getUserMedia({audio:true, video:true}, gotStream);
+shouldNotThrow('MediaStreamTrack.getSources(gotSourceInfos1);');
window.jsTestIsAsync = true;
window.successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698