Skip to content
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

Verify duplicate calls to onLoadingStateChanged on first load #926

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ internal class PictureInPictureObserver(
) : SelectionAwareSessionObserver(sessionManager) {
private val whiteList = listOf("youtube.com/tv")

override fun onLoadingStateChanged(session: Session, loading: Boolean) {
super.onLoadingStateChanged(session, loading)
println("SEVTEST: loading: $loading, session: $session")
}

// The following was printed on my first page load after opening a new tab. Not reproducible on following page loads
/*
2019-10-18 16:43:02.119 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: true, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, http://google.com)
2019-10-18 16:43:02.151 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: false, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, http://google.com)
2019-10-18 16:43:02.553 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: true, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, http://google.com)
2019-10-18 16:43:02.581 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: false, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, http://google.com)
2019-10-18 16:43:02.631 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: true, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, http://google.com)
2019-10-18 16:43:03.626 14883-14883/org.mozilla.reference.browser.debug I/System.out: SEVTEST: loading: false, session: Session(363e8f25-3d40-49df-a0b7-e6dadd90d364, https://www.google.com/?gws_rd=ssl)
*/

override fun onSessionSelected(session: Session) {
super.onSessionSelected(session)
whiteListed(isWhitelisted(session.url))
Expand Down