xpcshell should be able to create multiple test children

RESOLVED WONTFIX

Status

()

defect
RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

6 years ago
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)
Assignee

Updated

6 years ago
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)
Assignee

Comment 3

6 years ago
(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!
Assignee

Comment 4

6 years ago
(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.
Assignee

Updated

6 years ago
Depends on: 855127
Assignee

Comment 5

6 years ago
Now with tests.
Assignee: nobody → jimb
Attachment #721753 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Assignee

Updated

6 years ago
Depends on: 857652
Assignee

Comment 6

6 years ago
The patch in bug 874755 has a nicer way to solve these problems.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.