Closed Bug 848408 Opened 12 years ago Closed 12 years ago

xpcshell should be able to create multiple test children

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jimb, Assigned: jimb)

References

Details

Attachments

(1 file, 1 obsolete file)

For testing debugging support, I would like to be able to create more than one test child in xpcshell. The attached patch adds a new JS function to xpcshell, startTestShellChild, which creates a new ContentParent (and associated child) and has it run a command. This command can send a message to the parentprocessmessagemanager; that message's 'target' will be the child's message manager, so the parent and child can now communicate. I'm new to coding outside js/src, so I'm very open to suggestions; please be critical.
Attachment #721753 - Flags: review?(bugs)
Blocks: 797627
"for testing debugging support" implies this could be used to enable remote debugging of xpcshell tests. If so, please mark as blocking on bug 836410! If so, you will become the new best friend of many JavaScript developers who have long agonized at the inability to debug xpcshell tests!
Comment on attachment 721753 [details] [diff] [review] Define a new xpcshell JS function: startTestShellChild. You don't use aForBrowserElement parameter for anything. And based on that, is this perhaps untested patch? But I'm not familiar with nsEmbedFunctions.cpp, nor xpcshell. bsmedberg might be better reviewer?
Attachment #721753 - Flags: review?(bugs)
(In reply to Gregory Szorc [:gps] from comment #1) > "for testing debugging support" implies this could be used to enable remote > debugging of xpcshell tests. If so, please mark as blocking on bug 836410! > If so, you will become the new best friend of many JavaScript developers who > have long agonized at the inability to debug xpcshell tests! I would love to be those people's best friend. This patch does not do that. :) Bug 797627 entails establishing debug protocol communications with content child processes. This bug entails giving xpcshell the facilities I need to test my work there. Thank you for reminding me about bug 836410, though!
(In reply to Olli Pettay [:smaug] from comment #2) > Comment on attachment 721753 [details] [diff] [review] > Define a new xpcshell JS function: startTestShellChild. > > You don't use aForBrowserElement parameter for anything. And based on that, > is > this perhaps untested patch? You're right. This patch also doesn't contain any tests for the functionality it adds. I promise I usually do better... > But I'm not familiar with nsEmbedFunctions.cpp, nor xpcshell. > bsmedberg might be better reviewer? Thanks; I'll ask him to look at the revision.
Depends on: 855127
Now with tests.
Assignee: nobody → jimb
Attachment #721753 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Depends on: 857652
The patch in bug 874755 has a nicer way to solve these problems.
Status: ASSIGNED → RESOLVED
Closed: 12 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: