MSE Compliance Test: Fail test 42: MediaSourceDuration

RESOLVED WORKSFORME

Status

()

Core
Audio/Video: Playback
P3
normal
RESOLVED WORKSFORME
4 years ago
3 years ago

People

(Reporter: jya, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

TestRunner:  All tests are completed 
TestRunner:  Longest test is MediaSourceDuration, it takes 0.2748333333333333 of its timeout. 
TestRunner:  Finished! 
TestRunner:  New longest test MediaSourceDuration with timeout 30000 takes 8245 
TestRunner:  TestRunner.prototype.error@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20141211110536.js:410:9
TestRunner.prototype.assert@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20141211110536.js:180:5
TestRunner.prototype.check@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20141211110536.js:197:5
TestRunner.prototype.checkEq@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20141211110536.js:211:1
ConformanceTest/testMediaSourceDuration.prototype.onsourceopen/</<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/tests/2015/conformanceTest-20141211110536.js:1096:1
done@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20141211110536.js:510:9
loop@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20141211110536.js:546:9
appendBufferFinished@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20141211110536.js:502:9
 
MediaSourceDuration:    0: (0, 10.010322) 
MediaSourceDuration:  sb0.buffered.length 1 
MediaSourceDuration:  ms.sb count = 1 
MediaSourceDuration:  video.networkState = 2 
MediaSourceDuration:  video.readyState = 3 
MediaSourceDuration:  video.currentTime = 1.876988 
TestRunner:  Assert failed: ms.duration is (0) which should be (Infinity) 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (1184). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (32768). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
MediaSourceDuration:  MS test started 
TestRunner:  Starting test 42:MediaSourceDuration with timeout 30000

Updated

4 years ago
Priority: -- → P2
Bug 1119757 made us progress (as we now properly handle MSE infinite duration), but it fails later:

TestRunner:  All tests are completed 
TestRunner:  Longest test is MediaSourceDuration, it takes 0.3157333333333333 of its timeout. 
TestRunner:  Finished! 
TestRunner:  New longest test MediaSourceDuration with timeout 30000 takes 9472 
TestRunner:  TestRunner.prototype.error@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150204153408.js:410:9
TestRunner.prototype.assert@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150204153408.js:180:5
TestRunner.prototype.check@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150204153408.js:197:5
TestRunner.prototype.checkLE@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150204153408.js:244:1
ConformanceTest/testMediaSourceDuration.prototype.onsourceopen/</<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/tests/2015/conformanceTest-20150204153408.js:1101:1
done@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150204153408.js:510:9
loop@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150204153408.js:546:9
appendBufferFinished@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150204153408.js:502:9
 
MediaSourceDuration:    0: (0, 10.010322) 
MediaSourceDuration:  sb0.buffered.length 1 
MediaSourceDuration:  ms.sb count = 1 
MediaSourceDuration:  video.networkState = 2 
MediaSourceDuration:  video.readyState = 2 
MediaSourceDuration:  video.currentTime = 4.838488 
TestRunner:  Assert failed: Range end is (10.010322) which should be less than or equal to (5.1) 
TestRunner:  checkEq passed: media.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (Infinity). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (1184). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (32768). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
MediaSourceDuration:  MS test started 
TestRunner:  Starting test 42:MediaSourceDuration with timeout 30000

Updated

3 years ago
Priority: P2 → P3

Comment 2

3 years ago
This seems to be fixed.

TestRunner:  All tests are completed 
TestRunner:  Longest test is MediaSourceDuration, it takes 0.08256666666666666 of its timeout. 
TestRunner:  Finished! 
TestRunner:  New longest test MediaSourceDuration with timeout 30000 takes 2477 
TestRunner:  Test MediaSourceDuration succeeded. 
MediaSourceDuration:  onsourceclose called 
TestRunner:  checkEq passed: media.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkApproxEq passed: ms.duration is (10.010322). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
Seeking to segment index=0 time=0 start=0 length=5.005 
TestRunner:  checkLE passed: Range end is (5). 
TestRunner:  checkEq passed: media.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (Infinity). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (1184). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (32768). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
MediaSourceDuration:  MS test started 
TestRunner:  Starting test 42:MediaSourceDuration with timeout 30000 
TestRunner:  Media Source and Encrypted Media Conformance Tests (version 20150326133122-e5cOEaP8ocqTCH34)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME

Comment 3

3 years ago
Log using v 20150729140035-uXMqKELDmjp4d9N5:

TestRunner:  All tests are completed 
TestRunner:  Longest test is MediaSourceDuration, it takes 0.05053333333333333 of its timeout. 
TestRunner:  Finished! 
TestRunner:  New longest test MediaSourceDuration with timeout 30000 takes 1516 
TestRunner:  TestRunner.prototype.error@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:411:9
TestRunner.prototype.assert@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:181:5
TestRunner.prototype.check@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:198:5
TestRunner.prototype.checkLE@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:245:1
ConformanceTest/testMediaSourceDuration.prototype.onsourceopen/</<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/tests/2015/conformanceTest-20150729140035.js:1056:1
done@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:510:9
loop@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:546:9
appendBufferFinished@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:502:9
EventListener.handleEvent*window.appendUntil/appendHandler<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:518:5
window.appendUntil@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:477:24
ConformanceTest/testMediaSourceDuration.prototype.onsourceopen/<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/tests/2015/conformanceTest-20150729140035.js:1050:5
appendedCb@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:448:9
EventListener.handleEvent*window.appendInit/<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:446:5
window.FileSource/this.init/xhr</xhr<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/lib/mse/2015/msutil-20150729140035.js:180:11
Request/this.open/<@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/xhr-20150729140035.js:63:14
EventListener.handleEvent*Request/this.open@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/xhr-20150729140035.js:61:5
EventListener.handleEvent*Request/this.open@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/xhr-20150729140035.js:61:5
EventListener.handleEvent*window.createMSTest/t.prototype.start@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:136:1
TestRunner.prototype.startNextTest@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:388:3
EventHandlerNonNull*Test/this.createElement@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/compactTestList-20150729140035.js:56:5
TestList/createExtraCompactTable/createTestCells@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/compactTestList-20150729140035.js:173:7
TestList/createExtraCompactTable@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/compactTestList-20150729140035.js:219:7
TestList/this.generate@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/compactTestList-20150729140035.js:243:7
TestView/this.generate@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/testView-20150729140035.js:170:5
CompactTestView/this.generate@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/compactTestView-20150729140035.js:52:5
TestRunner.prototype.initialize@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/test-20150729140035.js:288:3
startRunner@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/main-20150729140035.js:145:3
window.startMseTest@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/js/harness/main-20150729140035.js:161:3
@http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2015.html?timestamp=1439370090215&tests=42:48:7
 
MediaSourceDuration:    0: (0, 10.010322) 
MediaSourceDuration:  sb0.buffered.length 1 
MediaSourceDuration:  ms.sb count = 1 
MediaSourceDuration:  video.networkState = 2 
MediaSourceDuration:  video.readyState = 3 
MediaSourceDuration:  video.currentTime = 0.459575 
TestRunner:  Assert failed: Range end is (10.010322) which should be less than or equal to (5.1) 
TestRunner:  checkEq passed: media.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (Infinity). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (1184). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (32768). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
MediaSourceDuration:  MS test started 
TestRunner:  Starting test 42:MediaSourceDuration with timeout 30000 
TestRunner:  Media Source and Encrypted Media Conformance Tests (version 20150729140035-uXMqKELDmjp4d9N5)
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Component: Audio/Video → Audio/Video: Playback

Comment 4

3 years ago
Tested on Nightly 43.0a1 @ Mac OSX 10.10.5, and test 42: MediaSourceDuration still failed.

The following is the JS testing code (js/tests/2015/conformanceTest-20150911114849.js):

var testMediaSourceDuration = createConformanceTest(
    'MediaSourceDuration', 'MSE');
testMediaSourceDuration.prototype.title =
    'Test if the duration on MediaSource can be set and retrieved sucessfully.';
testMediaSourceDuration.prototype.onsourceopen = function() {
  var runner = this.runner;
  var media = this.video;
  var ms = this.ms;
  var videoChain = new ResetInit(
      new FileSource(StreamDef.VideoNormal.src, runner.XHRManager,
          runner.timeouts));
  var videoSb = this.ms.addSourceBuffer(StreamDef.VideoType);
  var self = this;
  var onsourceclose = function() {
    self.log('onsourceclose called');
    runner.assert(isNaN(ms.duration));
    runner.succeed();
  };

  runner.assert(isNaN(media.duration), 'Initial media duration not NaN');
  media.play();
  appendInit(media, videoSb, videoChain, 0, function() {
    appendUntil(runner.timeouts, media, videoSb, videoChain, 10, function() {
      runner.checkApproxEq(ms.duration,
          StreamDef.VideoNormal.customMap.mediaSourceDuration, 'ms.duration', 0.01);
      ms.duration = 5;
      runner.checkEq(ms.duration, 5, 'ms.duration');
      runner.checkEq(media.duration, 5, 'media.duration');
      runner.checkLE(videoSb.buffered.end(0), 5.1, 'Range end');

Testrunner checks the buffered range of sourcebuffer right after the mediasource duration setter call.
In the duration setter, TrackBuffersManager::RangeRemoval is called and returns a RangeRemovalPromise.
It's not guaranteed that SourceBuffer's buffered range should be less than 5.1 at this moment.

I tried to break in JS right after the duration setter (ms.duration = 5;),
wait for 1~2 sec, continue and the test succeeded.

Current spec of range removal algorithm (https://www.w3.org/TR/media-source/#sourcebuffer-range-removal)
also indicates "Return control to the caller and run the rest of the steps asynchronously."
So I think it's not a bug of Firefox. It's a mistake of the conformance test.

How do you think?
Flags: needinfo?(cpearce)
Jean-Yves should answer this one.
Flags: needinfo?(cpearce) → needinfo?(jyavenard)
Yes, the test is wrong and our implementation is correct. 

There are two other tests that are wrong: duration after append buffer, but those are racy and so usually pass. 

They do appendbuffer of content and immediately test the length of the media element which is to be modified a synchronously as well.
Flags: needinfo?(jyavenard)

Comment 7

3 years ago
Test passed.

TestRunner:  All tests are completed 
TestRunner:  Longest test is MediaSourceDuration, it takes 0.2312 of its timeout. 
TestRunner:  Finished! 
TestRunner:  New longest test MediaSourceDuration with timeout 30000 takes 6936 
TestRunner:  Test MediaSourceDuration succeeded. 
MediaSourceDuration:  onsourceclose called 
TestRunner:  checkEq passed: media.duration is (5.005). 
TestRunner:  checkApproxEq passed: ms.duration is (5.005). 
TestRunner:  checkApproxEq passed: ms.duration is (5.005). 
TestRunner:  checkApproxEq passed: ms.duration is (10.010322). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
Seeking to segment index=0 time=0 start=0 length=5.005 
TestRunner:  checkLE passed: Range end is (5.005). 
TestRunner:  checkEq passed: media.duration is (5). 
TestRunner:  checkEq passed: ms.duration is (5). 
TestRunner:  checkApproxEq passed: ms.duration is (Infinity). 
TestRunner:  checkEq passed: XHR length is (686458). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (695313). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (1184). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
TestRunner:  checkEq passed: XHR length is (32768). 
TestRunner:  checkNE passed: request index is (0). 
TestRunner:  checkEq passed: XHR requestType is (GET). 
TestRunner:  checkEq passed: request index is (-1). 
MediaSourceDuration:  MS test started 
TestRunner:  Starting test 42:MediaSourceDuration with timeout 30000 
TestRunner:  Media Source and Encrypted Media Conformance Tests (version 20151028103055-eGWzMcOnijcb7b0S)
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → WORKSFORME
Please, as mentioned more than once before. Leave those bugs alone. They are not yours to resolve
You need to log in before you can comment on or make changes to this bug.