Re: How to create a child process in a chrome mochitest?

2013-09-06 Thread Gavin Sharp
On Fri, Sep 6, 2013 at 1:32 PM, Nicholas Nethercote
 wrote:
> With the above code I do get an iframe that loads about:about, which
> is good.  But there's no child process created, and when I inspect the
> |remote| attribute of the iframe it is |undefined|, as if something
> prevented it from being set to true.

Note that  elements do not have .remote property
getter/setters, so you need to check e.g.
browser.hasAttribute("remote") rather than browser.remote.

Gavin
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to create a child process in a chrome mochitest?

2013-09-06 Thread Tom Schuster
Here is the CPOW test that creates a remote browser:
http://mxr.mozilla.org/mozilla-central/source/content/base/test/chrome/test_cpows.xul


On Fri, Sep 6, 2013 at 9:41 AM, Neil  wrote:

> Nicholas Nethercote wrote:
>
>  In theory, this is as easy as  or > remote>, or something like that.  But I've tried about 80 different
>> variations on these, and I cannot get a child process.
>>
>>  Mochitests already run inside a browser, so attempting to nest a child
> browser will fail. Try opening a chrome window with a XUL document
> containing a remote browser element.
>
> --
> Warning: May contain traces of nuts.
>
> __**_
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/**listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to create a child process in a chrome mochitest?

2013-09-06 Thread Neil

Nicholas Nethercote wrote:


In theory, this is as easy as  or , 
or something like that.  But I've tried about 80 different variations on these, and I 
cannot get a child process.

Mochitests already run inside a browser, so attempting to nest a child 
browser will fail. Try opening a chrome window with a XUL document 
containing a remote browser element.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to create a child process in a chrome mochitest?

2013-09-06 Thread Benjamin Smedberg

On 9/6/2013 2:32 AM, Nicholas Nethercote wrote:


In theory, this is as easy as  or 
 is what B2G uses. It requires the prefs 
than Kan-Ru mentions.


 is what desktop uses. It does not require 
special prefs that I know of.


--BDS

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to create a child process in a chrome mochitest?

2013-09-06 Thread 陳侃如
You need to enable the mozbrowser attribute by flipping

 dom.mozBrowserFramesEnabled

And you need the "browser" permission.

layout/base/tests/test_remote_passpointerevents.html is a good example.

  Kanru

Nicholas Nethercote  writes:

> Hi,
>
> I want to create a child process in
> toolkit/components/aboutmemory/tests/test_memoryReporters.xul, so I
> can test the cross-process memory reporting.
>
> In theory, this is as easy as  or  remote>, or something like that.  But I've tried about 80 different
> variations on these, and I cannot get a child process.
>
> This is the closest I've got:
>
> remote="true"/>
>
> AIUI, the |html:| prefix and the |="true"| attribute values are
> necessary because this is a XUL file and hence XML.  My 
> element looks like this:
>
>  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
> xmlns:html="http://www.w3.org/1999/xhtml";>
>
> With the above code I do get an iframe that loads about:about, which
> is good.  But there's no child process created, and when I inspect the
> |remote| attribute of the iframe it is |undefined|, as if something
> prevented it from being set to true.
>
> What am I doing wrong?  The docs
> (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe and
> https://developer.mozilla.org/en-US/docs/WebAPI/Browser?redirectlocale=en-US&redirectslug=DOM%2FUsing_the_Browser_API
> and https://developer.mozilla.org/en-US/docs/XUL/iframe) make it
> sounds like this should be easy.
>
> Nick
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


How to create a child process in a chrome mochitest?

2013-09-05 Thread Nicholas Nethercote
Hi,

I want to create a child process in
toolkit/components/aboutmemory/tests/test_memoryReporters.xul, so I
can test the cross-process memory reporting.

In theory, this is as easy as  or , or something like that.  But I've tried about 80 different
variations on these, and I cannot get a child process.

This is the closest I've got:

   

AIUI, the |html:| prefix and the |="true"| attribute values are
necessary because this is a XUL file and hence XML.  My 
element looks like this:

http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
xmlns:html="http://www.w3.org/1999/xhtml";>

With the above code I do get an iframe that loads about:about, which
is good.  But there's no child process created, and when I inspect the
|remote| attribute of the iframe it is |undefined|, as if something
prevented it from being set to true.

What am I doing wrong?  The docs
(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe and
https://developer.mozilla.org/en-US/docs/WebAPI/Browser?redirectlocale=en-US&redirectslug=DOM%2FUsing_the_Browser_API
and https://developer.mozilla.org/en-US/docs/XUL/iframe) make it
sounds like this should be easy.

Nick
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform