Closed Bug 1389249 Opened 3 years ago Closed 2 years ago

Autophone - handle cache properly on android


(Testing :: Autophone, defect)

Not set


(Not tracked)



(Reporter: bc, Assigned: bc)




(2 files)

As noted in Bug 1388883, the cache used by Fennec is located in the /data/data/<appname> directory and not in the profile. If this is right, this means that our recreating the profile for each initial uncached measurement does not give us the real uncached behavior.

In addition, the fact that we can run tests from autoland, inbound, mozilla-central, mozilla-beta, mozilla-release means we could also be hitting the specific issues with cached stale unit test files being served to the wrong builds.

So should we ... 

1. use the pref browser.cache.disk.parent_directory in bug 1388883 comment 3 to set the location of the cache to a location where we can delete it without root permissions or..

2. use adb shell pm clear <app> suggested in bug 1388883 comment 2 though this may require root?

It seems #1 is the better choice in that we can put the cache somewhere we can delete it.

Snorp, any opinion?
Flags: needinfo?(snorp)
Yeah, option #1 seems fine to me.
Flags: needinfo?(snorp)
This patch sets the pref to place the cache underneath the <profile>/cache directory. The actual path to the cache files will be <profile>/cache/cache2.

Snorp: Is this ok or is there a need to place the cache directory outside of the profile? It tests ok.
Attachment #8933646 - Flags: review?(gbrown)
Attachment #8933646 - Flags: feedback?(snorp)
Geoff, this patch is a belt & suspenders patch which uses the optional argument to install_profile properly and prevents the use of a "default" profile created by mozprofile by raising an exception in install_profile if the profile is not specified.
Attachment #8933647 - Flags: review?(gbrown)
Attachment #8933646 - Flags: feedback?(snorp) → feedback+
Attachment #8933646 - Flags: review?(gbrown) → review?(jmaher)
Attachment #8933647 - Flags: review?(gbrown) → review?(jmaher)
Comment on attachment 8933646 [details] [diff] [review]

Review of attachment 8933646 [details] [diff] [review]:

code wise this is fine, sounds like snorp f+ this as well.
Attachment #8933646 - Flags: review?(jmaher) → review+
Comment on attachment 8933647 [details] [diff] [review]

Review of attachment 8933647 [details] [diff] [review]:

I see this as problematic, but effective for now.
Attachment #8933647 - Flags: review?(jmaher) → review+
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.