Make sure we do not skip the HaveMetadata state. Fixes a bunch of tests

This commit is contained in:
Fernando Jiménez Moreno 2018-10-03 20:39:19 +02:00
parent 6b0acc9cd8
commit 11ac049d27
5 changed files with 21 additions and 0 deletions

View file

@ -1314,6 +1314,11 @@ impl FetchResponseListener for HTMLMediaElementContext {
}
if status.is_ok() {
if elem.ready_state.get() == ReadyState::HaveNothing {
// Make sure that we don't skip the HaveMetadata and HaveCurrentData
// states for short streams.
elem.change_ready_state(ReadyState::HaveMetadata);
}
elem.change_ready_state(ReadyState::HaveEnoughData);
elem.upcast::<EventTarget>().fire_event(atom!("progress"));

View file

@ -0,0 +1,4 @@
[load-events-networkState.html]
[NETWORK_NO_SOURCE]
expected: FAIL

View file

@ -0,0 +1,4 @@
[resource-selection-invoke-insert-into-iframe.html]
[NOT invoking resource selection by inserting into other document with src set]
expected: FAIL

View file

@ -0,0 +1,4 @@
[resource-selection-invoke-pause-networkState.html]
[NOT invoking resource selection with pause() when networkState is not NETWORK_EMPTY]
expected: FAIL

View file

@ -0,0 +1,4 @@
[resource-selection-invoke-remove-from-document-networkState.html]
[NOT invoking resource selection with implicit pause() when networkState is not NETWORK_EMPTY]
expected: FAIL