Closed Bug 488772 Opened 15 years ago Closed 15 years ago

Functional tests for Private Browsing mode not possible due to connection drop

Categories

(Firefox :: Private Browsing, defect)

3.5 Branch
defect
Not set
major

Tracking

()

VERIFIED FIXED
Firefox 3.6a1
Tracking Status
status1.9.1 --- .4-fixed

People

(Reporter: whimboo, Assigned: ehsan.akhgari)

References

Details

(Keywords: verified1.9.1, Whiteboard: [fixed by bug 496335])

+++ This bug was initially created as a clone of Bug #488752 +++

This bug is a spun-off from bug 488752. I talked with Clint and Mikeal on IRC and this seems to be a serious blocker for us. Running any Mozmill test from the command line or from buildbot (in the future) will fail. So no Private Browsing test automation would be possible.

Do we really have to shutdown all connections? Can't we have an exclusion list of protocols here? Something which is similar to network.security.ports.banned.override?

Here Clint's comment:

If you have any state listeners using sockets, those sockets are destroyed upon entry into PB mode. We use a socket mechanism to allow jsbridge to remote control a mozmill test running in "automatic" mode.  That's how we originally found this bug, in fact, the mozmill test stopped working.  I don't think this would affect a mochitest run.
Boris, is there any way to only kill SSL sockets and not the other types of sockets?  For some context, this was done in bug 463256...
Blocks: 463256
I have no idea.  You know at least as much about our socket code as I do...
Mikeal, can you detail the type of local socket connection that jsbridge uses to connect to the mozmill instance inside the browser?  I could try to describe it, but I think you can do a better job.
(In reply to comment #2)
> I have no idea.  You know at least as much about our socket code as I do...

Do you know anyone whom we should ask about this?  :-)
(In reply to comment #3)
> Mikeal, can you detail the type of local socket connection that jsbridge uses
> to connect to the mozmill instance inside the browser?  I could try to describe
> it, but I think you can do a better job.

It doesn't really matter, as currently the private browsing service turns offline mode on and off successively which should disconnect any type of socket connection AFAIK.
    this.serv = Cc['@mozilla.org/network/server-socket;1']
        .createInstance(Ci.nsIServerSocket);
    this.serv.init(this.port, true, -1);
    this.serv.asyncListen(this);

http://www.xulplanet.com/references/xpcomref/ifaces/nsIServerSocket.html
> It doesn't really matter, as currently the private browsing service turns
> offline mode on and off successively which should disconnect any type of socket
> connection AFAIK.

Is there a reason "offline" mode needs to disconnect from localhost connections? I can see a good use case for offline mode still connecting to localhost, like if I'm on a plane and I still want to develop against a local server.
> Do you know anyone whom we should ask about this?  :-)

Darin or biesi, maybe?
(In reply to comment #7)
> > It doesn't really matter, as currently the private browsing service turns
> > offline mode on and off successively which should disconnect any type of socket
> > connection AFAIK.
> 
> Is there a reason "offline" mode needs to disconnect from localhost
> connections? I can see a good use case for offline mode still connecting to
> localhost, like if I'm on a plane and I still want to develop against a local
> server.

The current services that the platform offers do not provide this level of granularity (i.e., we are either in offline state for everything or we're not).

However for the case of bug 463256, I'd argue that even if the platform did provide such a service, we'd still want to set everything to offline mode, to prevent the original problem in that bug to manifest itself for local SSL servers.

At the worst case, we could introduce a hidden pref which disables manipulation of the offline mode for MozMill tests, but I'd rather have mconnor's approval before writing a patch (which should be a trivial patch anyway).
(In reply to comment #8)
> > Do you know anyone whom we should ask about this?  :-)
> 
> Darin or biesi, maybe?

biesi: please see comment 1.

I'm not sure about Darin's bugzilla ID though...
Neither of them really reads bugmail nowadays, so you'd have to mail them directly...
Ehsan, have you ever got an answer from Darin or Biesi to your email?
Blocks: 479314
Severity: normal → major
(In reply to comment #12)
> Ehsan, have you ever got an answer from Darin or Biesi to your email?

No, unfortunately not.  I'm not sure how to proceed here...
Since I know Biesi I have contacted him too. Let's hope for an answer in the near future.
Depends on: 496335
Once bug 496335 is fixed, this will be a non-issue.
Whiteboard: [will be fixed by bug 496335]
496335 is fixed.
Assignee: nobody → ehsan.akhgari
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [will be fixed by bug 496335] → [fixed by bug 496335]
Looks fantastic. Mozmill tests for the Private Browsing mode are executed completely now! I hope we can get it into 1.9.1.

Verified fixed with the fresh debug build Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090711 Minefield/3.6a1pre ID:20090711205434
Status: RESOLVED → VERIFIED
Target Milestone: --- → Firefox 3.6a1
Henrik, this should now work on 1.9.1 as well.
That works fantastic with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.4pre) Gecko/20090831 Shiretoko/3.5.4pre ID:20090831030742
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.