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

Unified Diff: LayoutTests/fast/mediastream/MediaStream-oninactive.html

Issue 827673002: Add MediaStream.active attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Allow addTrack/removeTrack when mediastream.ended is true Created 5 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
Index: LayoutTests/fast/mediastream/MediaStream-oninactive.html
diff --git a/LayoutTests/fast/mediastream/MediaStream-onended.html b/LayoutTests/fast/mediastream/MediaStream-oninactive.html
similarity index 72%
copy from LayoutTests/fast/mediastream/MediaStream-onended.html
copy to LayoutTests/fast/mediastream/MediaStream-oninactive.html
index 3cd40cb337b1c4798f8e9a8e9186e14426b66f23..05976ed3314d786dc55b2c3d56261444c04cf7bb 100644
--- a/LayoutTests/fast/mediastream/MediaStream-onended.html
+++ b/LayoutTests/fast/mediastream/MediaStream-oninactive.html
@@ -7,7 +7,7 @@
<p id="description"></p>
<div id="console"></div>
<script>
-description("Tests MediaStream::onended callback.");
+description("Tests MediaStream::oninactive callback.");
function error() {
testFailed('Stream generation failed.');
@@ -25,17 +25,17 @@ function getUserMedia(dictionary, callback) {
var stream;
-function streamEnded2() {
- testPassed('streamEnded was called.');
- shouldBeTrue('stream.ended');
+function streamInactive2() {
+ testPassed('streamInactive was called.');
+ shouldBeFalse('stream.active');
finishJSTest();
}
function gotStream2(s) {
stream = new webkitMediaStream(s);
- shouldBeFalse('stream.ended');
+ shouldBeTrue('stream.active');
try {
- stream.onended = streamEnded2;
+ stream.oninactive = streamInactive2;
s.stop();
} catch (e) {
testFailed('MediaStream threw exception :' + e);
@@ -43,18 +43,18 @@ function gotStream2(s) {
}
}
-function streamEnded() {
- testPassed('streamEnded was called.');
- shouldBeTrue('stream.ended');
+function streamInactive() {
+ testPassed('streamInactive was called.');
+ shouldBeFalse('stream.active');
getUserMedia({audio:true, video:true}, gotStream2);
}
function gotStream(s) {
stream = s;
- shouldBeFalse('stream.ended');
+ shouldBeTrue('stream.active');
try {
- stream.onended = streamEnded;
+ stream.oninactive = streamInactive;
stream.stop();
} catch (e) {
testFailed('MediaStream threw exception :' + e);

Powered by Google App Engine
This is Rietveld 408576698