Open Bug 1636572 Opened 2 months ago Updated 2 months ago

[webvtt] The testcase fails if we allow sending onStartRequest via pHttpBackgroundChannel

Categories

(Core :: Audio/Video: Playback, task, P1)

task

Tracking

()

Tracking Status
firefox78 --- ?

People

(Reporter: alwu, Assigned: alwu, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When applying patches from bug1633935, it discovered the issue of the previous load interfering the track element when we start a new load.

When we start a new load, it's a two steps process. (1) decide if we need to start a new load (2) run a new load in the stable state.

In (1), if we've decided to start a new load, then we should abort the previous load immediately, in case that the previous load is finished before running (2), which would break our test [1].

[1] https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/media/test/test_texttrack_mode_change_during_loading.html#70-71

This patch will do :

  • prevent starting another a new load if the new load is exactly the same as the current running load

The advantage of doing so :

  • avoid running same process again, which is unnecessary

More details :
When applying patches from bug1633935, it discovered an issue of the previous load interfering the track element when we start a new load.
It happens on test_texttrack_mode_change_during_loading.html. In that test, the first load happens when we set the src to the track element [1] and the second load happens when we change the mode of the track element [2].

In this situation, the first load an the second load is actually the same, they are going to fetch data from the same resource. According to the step 1 in the spec [3], we should prevent running another load if there is another same running occurrence of this algorithm.

[1] https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/media/test/test_texttrack_mode_change_during_loading.html#53

[2] https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/media/test/test_texttrack_mode_change_during_loading.html#62

[3] https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model

Summary: [webvtt] avoid previous load affects the track element when starting a new load → [webvtt] The testcase fails if we allow sending onStartRequest via pHttpBackgroundChannel
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f2508a6e4c53
prevent start a non-necessary new load if we're running another load for the same URL. r=jya

Backed out changeset f2508a6e4c53 for causing wpt failures in track-element/cors/*

Backout link: https://hg.mozilla.org/integration/autoland/rev/52982461eaad7b9eb53773d876871bf78c529093

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Cpending%2Crunning%2Ctestfailed%2Cbusted%2Cexception%2Crunnable&fromchange=56c09d42f411246e407fe30418c27e67a6a44d29&searchStr=wpt&tochange=52982461eaad7b9eb53773d876871bf78c529093&selectedTaskRun=XkWSUsukR72PeyaRr1H9TQ-0

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301673978&repo=autoland&lineNumber=3604

[task 2020-05-11T06:35:48.839Z] 06:35:48     INFO - TEST-START | /html/semantics/embedded-content/media-elements/track/track-element/cors/003.html
[task 2020-05-11T06:35:48.844Z] 06:35:48     INFO - Closing window 572
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html | seek to currentTime 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm | seek to Number.MAX_VALUE 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm | seek to negative time 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-TIMEOUT | /html/semantics/embedded-content/media-elements/src_object_blob.html | HTMLMediaElement.srcObject blob - Test timed out
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/src_reflects_attribute_not_source_elements.html | audio.src - reflection test 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/src_reflects_attribute_not_source_elements.html | video.src - reflection test 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html | track element cloneNode, not loaded 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html | track element cloneNode, loading 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html | track element cloneNode, loaded 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-PASS | /html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html | track element cloneNode, failed to load 
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - TEST-UNEXPECTED-FAIL | /html/semantics/embedded-content/media-elements/track/track-element/cors/003.html | track CORS: No CORS, same-origin, no headers - assert_object_equals: unexpected property "1"
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - checkData@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:128:29
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - removeCookies@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:106:14
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - loadTrack/track.onload</xhr.onload<@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:87:18
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:49.160Z] 06:35:49     INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:2013:35
[task 2020-05-11T06:35:49.627Z] 06:35:49     INFO - TEST-OK | /html/semantics/embedded-content/media-elements/track/track-element/cors/003.html | took 784ms
[task 2020-05-11T06:35:50.570Z] 06:35:50     INFO - Closing logging queue
[task 2020-05-11T06:35:50.572Z] 06:35:50     INFO - queue closed
[task 2020-05-11T06:35:50.601Z] 06:35:50     INFO - Setting up ssl
[task 2020-05-11T06:35:50.629Z] 06:35:50     INFO - certutil | 
[task 2020-05-11T06:35:50.653Z] 06:35:50     INFO - certutil | 
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO - certutil | 
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO - Certificate Nickname                                         Trust Attributes
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO -                                                              SSL,S/MIME,JAR/XPI
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO - 
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO - web-platform-tests                                           CT,, 
[task 2020-05-11T06:35:50.681Z] 06:35:50     INFO - 
[task 2020-05-11T06:35:53.748Z] 06:35:53     INFO - adb Granting important runtime permissions to org.mozilla.geckoview.test
[task 2020-05-11T06:35:55.664Z] 06:35:55     INFO - adb launch_application: am start -W -n org.mozilla.geckoview.test/org.mozilla.geckoview.test.TestRunnerActivity -a android.intent.action.MAIN --es env9 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env8 R_LOG_DESTINATION=stderr --es args "-no-remote -profile /data/local/tmp/tests/profile --marionette about:blank" --es env3 MOZ_HIDE_RESULTS_TABLE=1 --es env2 R_LOG_VERBOSE=1 --es env1 MOZ_WEBRENDER=0 --es env0 MOZ_CRASHREPORTER=1 --es env7 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env6 MOZ_IN_AUTOMATION=1 --es env5 MOZ_LOG=signaling:3,mtransport:4,DataChannel:4,jsep:4 --es env4 STYLO_THREADS=1 --ez use_multiprocess True --es env12 R_LOG_LEVEL=6 --es env11 MOZ_PROCESS_LOG=/tmp/tmpGSN7RVpidlog --es env10 MOZ_CRASHREPORTER_NO_REPORT=1
[task 2020-05-11T06:35:57.434Z] 06:35:57     INFO - Starting runner
[task 2020-05-11T06:35:57.610Z] 06:35:57     INFO - TEST-START | /html/semantics/embedded-content/media-elements/track/track-element/cors/004.html
[task 2020-05-11T06:35:57.626Z] 06:35:57     INFO - Setting pref dom.security.featurePolicy.enabled (true)
[task 2020-05-11T06:35:57.650Z] 06:35:57     INFO - Setting pref dom.security.featurePolicy.header.enabled (true)
[task 2020-05-11T06:35:57.678Z] 06:35:57     INFO - Setting pref dom.security.featurePolicy.experimental.enabled (true)
[task 2020-05-11T06:35:57.702Z] 06:35:57     INFO - Setting pref dom.security.featurePolicy.webidl.enabled (true)
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - 
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - TEST-UNEXPECTED-FAIL | /html/semantics/embedded-content/media-elements/track/track-element/cors/004.html | track CORS: No CORS, same-origin, with headers - assert_object_equals: unexpected property "1"
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - checkData@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:128:29
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - removeCookies@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:106:14
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - loadTrack/track.onload</xhr.onload<@http://web-platform.test:8000/html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js?pipe=sub:87:18
[task 2020-05-11T06:35:58.033Z] 06:35:58     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1988:25
[task 2020-05-11T06:35:58.034Z] 06:35:58     INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:2013:35
[task 2020-05-11T06:35:58.508Z] 06:35:58     INFO - TEST-OK | /html/semantics/embedded-content/media-elements/track/track-element/cors/004.html | took 902ms
Flags: needinfo?(alwu)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:alwu, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(alwu)
You need to log in before you can comment on or make changes to this bug.