Closed Bug 677427 Opened 13 years ago Closed 13 years ago

xpcshell test netwerk/test/unit/test_bug650955.js fails on Android

Categories

(Core :: Networking: Cache, defect)

x86
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: gbrown, Assigned: gbrown)

Details

(Whiteboard: [mobile-testing][xpcshell])

Attachments

(3 files, 1 obsolete file)

With patches for bug 668349 and 668351, xpcshell tests can be run on an Android device, and the majority of tests pass. 

However, netwerk/test/unit/test_bug650955.js consistently fails when run on Android.

(I thought this might be related to intermittent failures of this test on Mac, and tried applying the patch from Bug 667593, but that did not help -- the test failed with identical error messages).
Whiteboard: [mobile-testing][xpcshell]
The memory cache tests pass, but the disk cache tests fail. The problem is that the preference browser.cache.disk.capacity has a default of 0 in Fennec, so the disk cache is still effectively disabled, even after browser.cache.disk.enable is set to true.
Assignee: nobody → gbrown
Attached patch patch for review (obsolete) — Splinter Review
test_bug650955.js passes reliably with this patch. If enabling the disk cache and disk cache capacity is 0, capacity is set to 1024 (an arbitrary, small cache). To guard against a similar issue arising with the memory cache, a similar check is made for the memory cache capacity, when enabling the memory cache.
Attachment #555125 - Flags: review?(bjarne)
Attached patch patch for reviewSplinter Review
I noticed a problem with the previous patch: If either of the capacity prefs does not exist, the test fails. Now updated to allow for non-existent prefs.
Attachment #555125 - Attachment is obsolete: true
Attachment #555125 - Flags: review?(bjarne)
Attachment #555265 - Flags: review?(bjarne)
Comment on attachment 555265 [details] [diff] [review]
patch for review

Review of attachment 555265 [details] [diff] [review]:
-----------------------------------------------------------------

Nice
Attachment #555265 - Flags: review?(bjarne) → review+
Keywords: checkin-needed
Comment on attachment 555265 [details] [diff] [review]
patch for review

I fixed end-of-line whitespace...
>+        if (memDevice) {
>+            try {
>+                cap = prefService.getIntPref("browser.cache.memory.capacity");
>+            } 
...here -------^

>+        if (diskDevice) {
>+            try {
>+                cap = prefService.getIntPref("browser.cache.disk.capacity");
>+            } 
...and here ---^

and pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/bc6b53c4e931
Keywords: checkin-needed
Whiteboard: [mobile-testing][xpcshell] → [mobile-testing][xpcshell][inbound]
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
http://hg.mozilla.org/mozilla-central/rev/bc6b53c4e931
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [mobile-testing][xpcshell][inbound] → [mobile-testing][xpcshell]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: