Implement cookieStoreId parameter for tabs.create
Categories
(GeckoView :: Extensions, enhancement, P2)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: gl, Assigned: gl)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Whiteboard: [fenix:q2:2020])
Attachments
(1 file)
This implements the cookieStoreId
parameter for tabs.create() that will allow for creating container tabs.
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Fenix request that work for this issue be completed in Q2 ahead of implementation of containers in Fenix in Q3.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Still a wip.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
We would like to see this done in Q2 for Fenix.
Assignee | ||
Comment 6•5 years ago
|
||
Comment on attachment 9142152 [details]
Bug 1622500 - Implement cookieStoreId parameter for tabs.create.
I am still running into an error https://treeherder.mozilla.org/#/jobs?repo=try&revision=02d4a960cc5778679732e6967f9837938897721d&selectedTaskRun=DxuTEXuTQnOcR2E8qtbjHg-0 and wondering if you know where else I am missing the changes to get the mochitest to pass.
TEST-UNEXPECTED-FAIL | mobile/android/components/extensions/test/mochitest/test_ext_tabs_create.html | Expected value for tab.cookieStoreId - Expected: firefox-container-1, Actual: firefox-default
with the changes to the TestRunnerActivity.java
to pass in the GeckoSessionSetting
with the contextId
when creating a GeckoSession
. I also made a similar change to GeckoViewActivity.java
, which I don't know if we want to keep or not.
I added a test in WebExtensionTest.java
in the meantime which gives me a bit more confidence.
Comment 7•5 years ago
•
|
||
Responded on Phabricator, copying it here:
From what I can see you also need to update get cookieStoreId
here: https://searchfox.org/mozilla-central/source/mobile/android/components/extensions/ext-utils.js#319-321
GeckoView uses a different attribute than Desktop, so the current implementation does not work. We set an attribute called geckoViewSessionContextId
, so the implenetion of get cookieStoreId
should read that instead, e.g. this.browser.getAttribute("geckoViewSessionContextId")
should give you the right value, except...
There's an extra step, for safety we transform the id a bit, see here: https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/StorageController.java#186-201 basically we append the string "gvctx" to the bytes hex representation of the string. To get the id that the extension is passed in we need to do the reverse transformation before returning it in the method above.
We can also chat about this on zoom/matrix if it makes it easier :)
Updated•5 years ago
|
Comment 8•5 years ago
|
||
I also made a similar change to GeckoViewActivity.java, which I don't know if we want to keep or not.
Yeah we need both, this one is for GeckoViewExample and the other one is for tests.
Comment 10•5 years ago
|
||
bugherder |
Description
•