Closed Bug 1023638 Opened 10 years ago Closed 10 years ago

toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js 303's to example.org

Categories

(Toolkit :: Safe Browsing, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33
Tracking Status
firefox31 --- fixed
firefox32 --- fixed
firefox33 --- fixed
firefox-esr24 --- wontfix
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

With the patches from bug 995417 applied:

15:42:38     INFO -  06-10 18:10:17.454  4278  4288 I Gecko   : [4278] WARNING: Non-local hostname example.org resolved: file ../../../gecko/netwerk/dns/nsHostResolver.cpp, line 1193
15:42:38     INFO -  06-10 18:10:17.454  4278  4280 I Gecko   : BAD CONNECT: connecting to example.org
15:42:38     INFO -  06-10 18:10:17.454  4278  4280 F MOZ_CRASH: Hit MOZ_CRASH(Attempting to connect to non-local address!) at ../../../../gecko/netwerk/base/src/nsSocketTransport2.cpp:1190

We shouldn't be using remote URLs in xpcshell tests.  I think the correct thing to do here is spin up a second (!) http server to redirect to.

It's curious that this is only a problem on b2g (noticed on the emulators), but I suspect this is just some timing issue.  The network requests must be canceled before going all the way through on desktop or something similar.
(In reply to Nathan Froyd (:froydnj) from comment #0)
> It's curious that this is only a problem on b2g (noticed on the emulators),
> but I suspect this is just some timing issue.

Ah, these tests were a) just enabled on b2g and MOZ_CAPTIVEDETECT is only enabled for b2g (why?!).
Since we can't connect to example.org, the next best thing is localhost.  But
connect to a separate http server, so as to preserve the semantics of using a
separate page for the redirect.
Attachment #8438089 - Flags: review?(schien)
(In reply to Nathan Froyd (:froydnj) from comment #1)
> (In reply to Nathan Froyd (:froydnj) from comment #0)
> > It's curious that this is only a problem on b2g (noticed on the emulators),
> > but I suspect this is just some timing issue.
> 
> Ah, these tests were a) just enabled on b2g and MOZ_CAPTIVEDETECT is only
> enabled for b2g (why?!).

Captive portal detection is only used by Firefox OS now and we didn't reach the consensus whether to use it on Firefox. It'll be better to use pref instead of compile option if we want this feature on Firefox.
Comment on attachment 8438089 [details] [diff] [review]
fix test_captive_portal_found_303.js to not redirect to example.org

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

lgtm
Attachment #8438089 - Flags: review?(schien) → review+
Thanks for the fast review!

https://hg.mozilla.org/integration/mozilla-inbound/rev/ff950ef6212f
Assignee: nobody → nfroyd
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/ff950ef6212f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: