Closed
Bug 1488635
Opened 7 years ago
Closed 7 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)
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•7 years ago
|
||
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #9006511 -
Flags: review?(ehsan)
| Reporter | ||
Comment 2•7 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•7 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•7 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
| Assignee | ||
Comment 4•7 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•7 years ago
|
Flags: needinfo?(ehsan)
| Reporter | ||
Updated•7 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•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
| Reporter | ||
Comment 8•7 years ago
|
||
Hmm, actually we don't cover these cases in the normal AntiTracking test suite in head.js, do we?
Flags: needinfo?(amarchesini)
| Assignee | ||
Updated•1 year ago
|
Flags: needinfo?(amarchesini)
You need to log in
before you can comment on or make changes to this bug.
Description
•