"TabManager.removeTab" needs to be async
Categories
(Remote Protocol :: Agent, defect, P1)
Tracking
(firefox107 fixed)
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m5], [wptsync upstream])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The TabManager.removeTab()
method is currently not async. It calls into tabBrowser.removeTab()
which we cannot assume it is synchronous.
When making this change locally I can get everything working except the following wdspec test: testing/web-platform/tests/webdriver/tests/bidi/browsing_context/navigate/wait.py::test_slow_image[complete-True].
The reason here is that the browsingContext.navigate
command with wait: complete
errors because we do not wait for it to finish on purpose but close the tab while the page is still loading. Maybe the test has to take it as a navigation aborted
case?
We probably want to wait with a fix here until bug 1506782 has been fixed.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:whimboo, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
With the code changes applied we run into a timeout error for /webdriver/tests/bidi/browsing_context/navigate/wait.py
:
0:16.67 pid:27538 1663952952965 RemoteAgent TRACE WebDriverBiDiConnection 9958f10e-092c-4913-9e19-4df65b2d5179 -> {"id":22,"method":"browsingContext.close","params":{"context":"abe20296-eef6-454b-bc54-d6ae9b670986"}}
0:16.67 pid:27538 1663952952965 RemoteAgent TRACE Received command browsingContext.close for destination ROOT
0:16.67 pid:27538 1663952952968 RemoteAgent TRACE [21] ProgressListener state=stop: error=0x80004004 (NS_ERROR_ABORT)
0:16.67 pid:27538 1663952952969 RemoteAgent TRACE MessageHandler WINDOW_GLOBAL for session 37623124-0863-4e4b-bba2-0d29869b23ce is being destroyed
0:16.68 pid:27538 1663952952969 RemoteAgent TRACE Unregistered MessageHandler WINDOW_GLOBAL for session 37623124-0863-4e4b-bba2-0d29869b23ce
0:16.68 pid:27538 1663952952970 RemoteAgent TRACE WebDriverBiDiConnection 9958f10e-092c-4913-9e19-4df65b2d5179 <- {"id":20,"error":"unknown error","message":"Error: NS_ERROR_ABORT","stacktrace":"#checkLoadingState@chrome://remote/content/shared/Navigate.jsm:239:28\nonStateChange@chrome://remote/content/shared/Navigate.jsm:284:28\n_endRemoveTab@chrome://browser/content/tabbrowser.js:4190:15\nremoveTab@chrome://browser/content/tabbrowser.js:3823:14\nremoveTab@chrome://remote/content/shared/TabManager.jsm:270:22\nclose@chrome://remote/content/webdriver-bidi/modules/root/browsingContext.jsm:138:27\nhandleCommand@chrome://remote/content/shared/messagehandler/MessageHandler.jsm:256:33\nexecute@chrome://remote/content/shared/webdriver/Session.jsm:241:32\nonPacket@chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.jsm:177:37\nonMessage@chrome://remote/content/server/WebSocketTransport.jsm:91:18\nhandleEvent@chrome://remote/content/server/WebSocketTransport.jsm:73:14\n"}
0:16.68 pid:27538 1663952952970 RemoteAgent TRACE WebDriverBiDiConnection 9958f10e-092c-4913-9e19-4df65b2d5179 <- {"id":22,"result":{}}
0:16.68 pid:27538 1663952952972 RemoteAgent TRACE MessageHandler WINDOW_GLOBAL for session 37623124-0863-4e4b-bba2-0d29869b23ce is being destroyed
0:16.68 pid:27538 1663952952972 RemoteAgent TRACE Unregistered MessageHandler WINDOW_GLOBAL for session 37623124-0863-4e4b-bba2-0d29869b23ce
0:16.68 pid:27538 JavaScript error: chrome://remote/content/shared/Navigate.jsm, line 239: Error: NS_ERROR_ABORT
Note that in such a case we do not await the call to browsingContext.navigate
with wait=complete
and go ahead and call browsingContext.close
. As such the navigation gets aborted and raises an error. Given that we do not await for the result of the navigation I actually do not expect that our test would fail on this failure.
Not sure yet if the navigation should actually fail or simply return.
Assignee | ||
Comment 3•2 years ago
|
||
Comment 5•2 years ago
|
||
bugherder |
Description
•