Open Bug 1844702 Opened 10 months ago Updated 10 months ago

Re-enable test_ext_page_3rdparty_cookies in toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js

Categories

(WebExtensions :: Android, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

Details

(Whiteboard: [addons-jira])

It looks like the network.cookie.cookieBehavior is not behaving correctly on Android, at least in xpcshell tests. This part of the reason for skipping test_ext_cookieBehaviors.js in bug 1680132.

When I run the following test with a .mozconfig for Android,
./mach test toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js --verbose --log-mach-verbose --sequential

I get the following failure at https://searchfox.org/mozilla-central/rev/d35b3fe3d8230a255b988afb0ebda1176fc2f50b/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js#276,302,326-330:

xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
FAIL test_ext_page_3rdparty_cookies - [test_ext_page_3rdparty_cookies : 57] Test top level extension page on BEHAVIOR_ACCEPT: cookies count on worker fetch "http://example.com/test-cookies" - 0 == 1
test_ext_cookieBehaviors.js:assertCookiesForHost:57
test_ext_cookieBehaviors.js:runTestRequests:297

Interestingly, the above test failure does not happen when I run with in-process extensions. Instead, I get the following error (which would also happen with out-of-process extensions if I skip the tests failing above), at https://searchfox.org/mozilla-central/rev/d35b3fe3d8230a255b988afb0ebda1176fc2f50b/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js#352-388

xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
FAIL test_ext_page_3rdparty_cookies - [test_ext_page_3rdparty_cookies : 57] Test cookies on web subframe inside top level extension page on BEHAVIOR_REJECT_TRACKER - 1 == 0
test_ext_cookieBehaviors.js:assertCookiesForHost:57
test_ext_cookieBehaviors.js:test_ext_page_3rdparty_cookies:387

The error suggests that the network.cookie.cookieBehavior pref does not work on Android (at least in a xpcshell test). Regardless of extension out-of-processness, when cookieBehavior is set to 4 (BEHAVIOR_REJECT_TRACKER),

Severity: -- → N/A
Priority: -- → P3
Whiteboard: [addons-jira]
You need to log in before you can comment on or make changes to this bug.