-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix vanishing tracks while offline #4426
fix: Fix vanishing tracks while offline #4426
Conversation
Introduced in shaka-project#4189, as a side-effect of restricting tracks when a network failure occurs. We should not trigger such restrictions when the browser is known to be offline. Closes shaka-project#4408
@@ -422,7 +422,6 @@ describe('Player', () => { | |||
dispatchEventSpy.calls.reset(); | |||
player.configure({streaming: {maxDisabledTime}}); | |||
player.setMaxHardwareResolution(123, 456); | |||
onErrorCallback(httpError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand, was this line moved to the it()
level since there's now a nested describe()
scenario that also needs to call onErrorCallback(httpError)
at the appropriate time in the jasmine test life cycle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The original author of these tests put onErrorCallback() in beforeEach(). But since that is the thing which triggers the code under test, it really belongs in the test itself. The rest can still be considered test setup.
This only became an issue when I wanted to nest another level with different setup. All setup needs to happen before the code under test is triggered.
Incremental code coverage: 100.00% |
Introduced in #4189, as a side-effect of restricting tracks when a
network failure occurs. We should not trigger such restrictions when
the browser is known to be offline.
Closes #4408