Closed
Bug 1250331
Opened 9 years ago
Closed 4 years ago
Get basic appcache tests working on e10s
Categories
(Core :: Networking: Cache, defect, P5)
Core
Networking: Cache
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: mrbkap, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-would-take])
Attachments
(1 file)
8.54 KB,
patch
|
Details | Diff | Splinter Review |
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)
Comment 1•9 years ago
|
||
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
Comment 2•9 years ago
|
||
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
Reporter | ||
Comment 3•9 years ago
|
||
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 → ---
![]() |
||
Comment 4•9 years ago
|
||
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)
Reporter | ||
Comment 5•9 years ago
|
||
(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.
Updated•9 years ago
|
Whiteboard: [necko-would-take]
![]() |
||
Comment 6•9 years ago
|
||
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
![]() |
||
Comment 7•9 years ago
|
||
- some basic simplifications
- remove tests for mozItems et al from (so far only) simpleManifest test
![]() |
||
Comment 9•9 years ago
|
||
don't fix these, we're going to kill appcache off now.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → WONTFIX
![]() |
||
Comment 10•9 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #9)
> don't fix these, we're going to kill appcache off now.
\ /
\O/
![]() |
||
Comment 11•9 years ago
|
||
![]() |
||
Comment 12•9 years ago
|
||
Also, you may use following functions:
https://dxr.mozilla.org/mozilla-central/rev/9bd90088875399347b05d87c67d3709e31539dcd/testing/specialpowers/content/specialpowersAPI.js#1473
https://wiki.mozilla.org/Electrolysis/e10s_test_tips#Mochitest_.28plain.29 (mainly the services part)
![]() |
||
Updated•9 years ago
|
Flags: needinfo?(jduell.mcbugs)
Comment 13•9 years ago
|
||
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)
Updated•9 years ago
|
Summary: Decide what to do with appcache tests → Get basic appcache tests working on e10s
Updated•9 years ago
|
Assignee: nobody → jduell.mcbugs
Whiteboard: [necko-would-take] → [necko-active]
Comment 14•9 years ago
|
||
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]
Comment 15•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Comment 16•4 years ago
|
||
Appcache was removed.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 4 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•