Closed Bug 575094 Opened 14 years ago Closed 10 years ago

e10s: test_bug528292.js relies on prefservice and fails in child

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
e10s + ---

People

(Reporter: jdm, Assigned: cojo, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [lang=js][good first bug])

Attachments

(2 files, 1 obsolete file)

I noticed this when looking at this log: http://tinderbox.mozilla.org/showlog.cgi?log=Electrolysis/1277638496.1277639938.9418.gz
Tests such as test_bug528292 are failing like so:

child: TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIPrefBranch.setIntPref]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: /builds/slave/electrolysis-linux-opt-unittest-xpcshell/build/xpcshell/tests/test_necko/unit/test_bug528292.js :: run_test :: line 37"  data: no]child: 

Since the test relies on third party cookies being disabled, the test is useless is its current form from the content process.  Any test that relies on the prefservice should be rewritten such that the pref is set in chrome before the rest of the test executes.
Blocks: fennecko
Summary: e10s: wrapped necko tests relying on prefservice need to be modified → e10s: test_bug528292.js relies on prefservice and fails in child
Attached patch PatchSplinter Review
This makes the test a bit more complicated, but runs the prefservice code in chrome, and adds cleanup as well.
Assignee: nobody → josh
Note that the test still fails because redirects are busted, but it fails for a better reason than before now.
Depends on: 536294
Attachment #454989 - Flags: review?(jduell.mcbugs)
can we remove this test until redirect pass?  or have them issue a todo as well?
I've disabled the test for now (bug 575845) by renaming it.  

  http://hg.mozilla.org/projects/electrolysis/rev/17d94262d309

Just "hg rename" it back when it's working.
Attachment #454989 - Flags: review?(jduell.mcbugs)
I think my patch is more complicated than necessary. Let's rename the file and add the usual process type check (http://mxr.mozilla.org/mozilla-central/source/modules/libjar/test/unit/head_ipc.js#9) around the pref setting code. The we can just duplicate the pref code around the call to run_test_in_child and everything should Just Work.
Assignee: josh → nobody
Whiteboard: [mentor=jdm][lang=js][good first bug]
Note: the way to run this test after renaming is ./mach xpcshell-test netwerk/test/unit_ipc/test_bug528292_wrap.js (and make sure to update the xpcshell.ini that's in the same directory as well).
Blocks: e10s-tests
No longer depends on: e10s-tests
Mentor: josh
Whiteboard: [mentor=jdm][lang=js][good first bug] → [lang=js][good first bug]
> Let's rename the file and add the usual process type check
> (http://mxr.mozilla.org/mozilla-central/source/modules/libjar/test/unit/head_ipc.js#9) 
> around the pref setting code. 
> The we can just duplicate the pref code around the 
> call to run_test_in_child and everything should Just Work.

I think this patch should satisfy the above requirements. I based the changes off other similar tests (ie: the inChildProcess() function comes from [1], and the changes to test_bug528292_wrap.js are based on [2]).

Both test_bug528292_wrap.js and test_bug528292.js ran without errors (caveat emptor: everything under netwerk/tests/unit_ipc/ was disabled for Mac OSX [3], so I had to fiddle to get test_bug528292_wrap.js to run at all).

[1] http://dxr.mozilla.org/mozilla-central/source/netwerk/cookie/test/unit/test_parser_0001.js#7
[2] http://dxr.mozilla.org/mozilla-central/source/netwerk/test/unit_ipc/test_cookie_header_wrap.js
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=575918
Attachment #8514020 - Flags: review?(josh)
Comment on attachment 8514020 [details] [diff] [review]
575094-reenable-test_bug528292_wrap.diff

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

Thanks! Apologies for the delay; I was on vacation. Please also format the commit message as "Bug #### - message. r=jdm"
Attachment #8514020 - Flags: review?(josh) → review+
> Thanks! Apologies for the delay; I was on vacation. Please also format the commit message as "Bug #### - message. r=jdm"
No worries. I modified the commit message and carried the r+ through.
Attachment #8514020 - Attachment is obsolete: true
Attachment #8519418 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/e021487d1297
Assignee: nobody → cojojennings
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: