-
Notifications
You must be signed in to change notification settings - Fork 32
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
chore: refactor navigation #2881
base: main
Are you sure you want to change the base?
Conversation
8a96b32
to
3d6fdd6
Compare
6b71d29
to
7f50236
Compare
} | ||
} | ||
|
||
/** | ||
* Keeps track of navigations. Details: http://go/webdriver:bidi-navigation | ||
*/ | ||
export class NavigationTracker { |
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.
could we cover major use cases with unit tests?
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.
added the major cases
There are a few new Puppeteer failures as well as far as I can see. |
a60c5df
to
ba31234
Compare
ba31234
to
b506b68
Compare
}, { | ||
'method': 'browsingContext.navigationStarted', | ||
'params': { | ||
'context': 'stable_0', |
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.
the order seems wrong, why is the navigationStarted after domContentLoaded?
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.
read_sorted_messages
sorts messages by methods alphabetically. We could introduce order-persisting helper method, but let's keep it out of scope of this PR
|
||
|
||
@pytest.mark.asyncio | ||
async def test_aboutBlank_reload_checkEvents(websocket, context_id, html, |
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.
let's add tests for history updated and fragment navigations in before unload?
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.
follow-up?
|
||
|
||
@pytest.mark.asyncio | ||
async def test_aboutBlank_reload_checkEvents(websocket, context_id, html, |
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.
let's add tests that traverse history causes appropriate events?
Addressing Align navigation with the spec.
Navigation tracker relies on the following events:
Page.frameNavigated
Network.requestWillBeSent
)Page.navigatedWithinDocument
Page.frameRequestedNavigation
Page.javascriptDialogOpening:beforeunload