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

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

Issue 16778002: MediaStream API: Changing the device enumeration to be async (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment fixed 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-getSources.html
diff --git a/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html b/LayoutTests/fast/mediastream/MediaStreamTrack-getSources.html
similarity index 64%
rename from LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html
rename to LayoutTests/fast/mediastream/MediaStreamTrack-getSources.html
index a4f7ad1229df0aa98080178acfc7abadf32534eb..4a20bab36adf33afb5d457734087ca75e4b01b35 100644
--- a/LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html
+++ b/LayoutTests/fast/mediastream/MediaStreamTrack-getSources.html
@@ -8,7 +8,7 @@
<p id="description"></p>
<div id="console"></div>
<script>
-description("Tests MediaStreamTrack::getSourceInfos.");
+description("Tests MediaStreamTrack::getSources.");
var sources = null;
var previousId;
@@ -27,19 +27,32 @@ function getUserMedia(constraints, callback) {
}
}
-function gotStream(s) {
- shouldNotThrow('sources = MediaStreamTrack.getSourceInfos();');
+function gotSources2(s) {
+ testPassed('gotSources2 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(gotSources2);');
+}
+
+function gotSources1(s) {
+ testPassed('gotSources1 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(gotSources1);');
window.jsTestIsAsync = true;
window.successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698