Skip to content

Commit

Permalink
Make sure we do not skip the HaveMetadata state. Fixes a bunch of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ferjm committed Oct 8, 2018
1 parent 6b0acc9 commit 11ac049
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/script/dom/htmlmediaelement.rs
Expand Up @@ -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"));
Expand Down
@@ -0,0 +1,4 @@
[load-events-networkState.html]
[NETWORK_NO_SOURCE]
expected: FAIL

@@ -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

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

@@ -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

0 comments on commit 11ac049

Please sign in to comment.