Closed Bug 1250331 Opened 9 years ago Closed 4 years ago

Get basic appcache tests working on e10s

Categories

(Core :: Networking: Cache, defect, P5)

defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
e10s + ---

People

(Reporter: mrbkap, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-would-take])

Attachments

(1 file)

There are 29 tests in the dom/tests/mochitest/ajax/offline directory dealing with appcache. They are all currently disabled for e10s (and b2g!), so we don't have any real visibility into how correct the code is for e10s. I have heard rumors that we want to remove appcache in favor of service workers but that hasn't happened yet. We need to decide what to do with the mochitests. I'm not sure who owns appcache, so Patrick, I'll start with you: Do we care about these tests in e10s? If we don't, we can mark them as "ignore" on the spreadsheet found at [1]. If we do, then we'll have to make them e10s compatible, which will probably mean using a chrome script to observe the proper notifications in the parent and send the right information down to the child. I can help with this, if needed. (One thing that might be a saving grace if we need to make them e10s compatible: they appear to mostly use a common offlineTests.js structure that could possibly fix most or all of the tests in one fell swoop). [1] https://docs.google.com/spreadsheets/d/10UeyRoiWV2HjkWwAU51HXyXAV7YLi4BjDm55mr5Xv6c/edit#gid=368835050
Flags: needinfo?(mcmanus)
oh, coincidence, I just sent an e-mail to Honza today asking about these tests, and he said we should probably not bother with them.. But I'd like to see what Patrick says, because as I understand there's a long process to deprecate this feature
I've marked them ignore. thanks! 1] appcache is going away in the medium term 2] appcache is pretty low risk for regression because I wontfix any non critical changes near it due to 1.. 3] rule 2 sort of applies here too.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(mcmanus)
Resolution: --- → FIXED
It appears that this decision was revisited. I've unmarked the appcache tests as "ignore" and I'm reopening this bug.
Status: RESOLVED → REOPENED
Flags: needinfo?(honzab.moz)
Resolution: FIXED → ---
I've quickly looked at the tests to assess how much work it could be to fix them. There are two problems (so far discovered): - some tests are calling on windows.applicationCache.mozItems et al content API that is not implemented in content (because it would mean complicated IPC sync calls to the parent) ; these all are not part of the appcache spec (used to be, but were loooong ago removed), are moz- prefixed (this firefox specifi) and probably not widely if at all used => I vote for that API no longer being tested and simply put as "known to not work" in e10s - the root test js helper (offlineTests.js script) calls on nsIApplicationCacheService intensively (from content) ; that is a gateway to the cache service (when on the parent process.) don't we happen to have some mechanism to do the IPC calls already for mochitests? if so, it could be easy to update offlienTests.js with it There may be more problems, but I would have to check the tests one by one which is pretty time consuming.
Flags: needinfo?(honzab.moz)
(In reply to Honza Bambas (:mayhemer) from comment #4) > - the root test js helper (offlineTests.js script) calls on > nsIApplicationCacheService intensively (from content) ; that is a gateway to > the cache service (when on the parent process.) don't we happen to have > some mechanism to do the IPC calls already for mochitests? if so, it could > be easy to update offlienTests.js with it We do! You can use SpecialPowers.loadChromeScript to load a script in the parent process (or in the same process in non-e10s). https://wiki.mozilla.org/Electrolysis/e10s_test_tips#Mochitest_.28plain.29 has some more info. You can often set observers in a chrome script and a message listener on your chrome script in the test and use the message listener instead of the observer service. > There may be more problems, but I would have to check the tests one by one > which is pretty time consuming. This sounds like a good start.
Whiteboard: [necko-would-take]
Thanks for the info, Blake! Only these functions need to be converted to be run on parent: OfflineTest.checkCache - must as a whole run on the parent (takes a callback, can be async) OfflineTest.getActiveCache - must examine nsIApplicationCacheService on the parent with manifest URL carried from child ; synchronously returns a fake object (or null when no cache is present for the manifest) with at least discard() method on it that will have to by capable of another sync call to parent (nsIApplicationCache.discard()) OfflineTest.waitForAdd will be removed. We have to add synchronous OfflineTest.chooseApplicationCache that on the parent calls on nsIApplicationCacheService.chooseApplicationCache. Any volunteers ;) ?
Status: REOPENED → NEW
Attached patch wip to start onSplinter Review
- some basic simplifications - remove tests for mozItems et al from (so far only) simpleManifest test
don't fix these, we're going to kill appcache off now.
Status: NEW → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → WONTFIX
Depends on: 1237782
(In reply to Jim Mathies [:jimm] from comment #9) > don't fix these, we're going to kill appcache off now. \ / \O/
Based on further discussion (which is like April weather! :)) reopening. We will try to find someone to work on this according the "wip to start on" patch and comment 4 (mainly removing the dynamic items support) + comment 6 instructions.
Status: RESOLVED → REOPENED
No longer depends on: 1237782
Resolution: WONTFIX → ---
Flags: needinfo?(jduell.mcbugs)
Not sure what the needinfo is for exactly, but as comment 11 notes, we are re-opening this and will have some basic e10s appcache tests. Not sure yet if that'll be honza who does it or hopefully someone else I find who he can mentor,
Flags: needinfo?(jduell.mcbugs)
Summary: Decide what to do with appcache tests → Get basic appcache tests working on e10s
Assignee: nobody → jduell.mcbugs
Whiteboard: [necko-would-take] → [necko-active]
We've done hand-testing of appcache on e10s, and the code is unlikely to change often enough (hopefully it won't change at all before we eventually remove it). Automating e10s tests is looking like more work than it's worth--we can just hand-test again if we change the code. I'd vote for e10s-untracking this.
Assignee: jduell.mcbugs → nobody
Whiteboard: [necko-active] → [necko-would-take]
Priority: -- → P5
Depends on: 1237782
Depends on: 1619673

Appcache was removed.

Status: REOPENED → RESOLVED
Closed: 9 years ago4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: