Closed
Bug 1488635
Opened 6 years ago
Closed 6 years ago
Add a test with the cookie permission for the image cache case
Categories
(Firefox :: Protections UI, enhancement, P1)
Firefox
Protections UI
Tracking
()
RESOLVED
FIXED
Firefox 64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: baku, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
7.41 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Our coverage data shows that we currently don't cover the image cache case when cookie permissions are set: https://codecov.io/gh/mozilla/gecko-dev/src/e126996/toolkit/components/antitracking/AntiTrackingCommon.cpp#L609 baku, do you have cycles to take this?
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 1•6 years ago
|
||
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #9006511 -
Flags: review?(ehsan)
Reporter | ||
Comment 2•6 years ago
|
||
Comment on attachment 9006511 [details] [diff] [review] image_test.patch Review of attachment 9006511 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/antitracking/test/browser/browser_imageCache7.js @@ +2,5 @@ > + > +/* Setting a custom permission for this website */ > +let uriObj = Services.io.newURI(TEST_DOMAIN); > +let cp = Cc["@mozilla.org/cookie/permission;1"] > + .getService(Ci.nsICookiePermission); I just made this not work in bug 1488784. :-) Please use the permission manager directly instead, like the part 1 patch there does.
Attachment #9006511 -
Flags: review?(ehsan) → review+
Reporter | ||
Comment 3•6 years ago
|
||
Comment on attachment 9006511 [details] [diff] [review] image_test.patch Review of attachment 9006511 [details] [diff] [review]: ----------------------------------------------------------------- Actually r- because of the below reason. ::: toolkit/components/antitracking/test/browser/imageCacheWorker.js @@ +39,5 @@ > await new Promise(resolve => { img.onload = resolve; }); > ok(true, "Image 4 loaded"); > }, > }, > null, // cleanup function Actually, you need to add a cleanup function now, I think, to ensure the added permission is indeed cleared at the end of the test.
Attachment #9006511 -
Flags: review+ → review-
Updated•6 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee | ||
Comment 4•6 years ago
|
||
> Actually, you need to add a cleanup function now, I think, to ensure the > added permission is indeed cleared at the end of the test. This is done by imageCacheWorker.js: https://searchfox.org/mozilla-central/rev/5a18fb5aeeec99f1ca1c36a697082c221189a3b9/toolkit/components/antitracking/test/browser/imageCacheWorker.js#58
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(ehsan)
Reporter | ||
Updated•6 years ago
|
Attachment #9006511 -
Flags: review- → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bf109313acc3 Add a test with the cookie permission for the image cache case, r=ehsan
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf109313acc3
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Reporter | ||
Comment 8•6 years ago
|
||
Hmm, actually we don't cover these cases in the normal AntiTracking test suite in head.js, do we?
Flags: needinfo?(amarchesini)
You need to log in
before you can comment on or make changes to this bug.
Description
•