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

RESOLVED FIXED in Firefox 31, Firefox OS v1.3

Status

()

Toolkit
Safe Browsing
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

Trunk
mozilla33
All
Gonk (Firefox OS)
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(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)

Details

Attachments

(1 attachment)

(Assignee)

Description

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

Comment 1

4 years ago
(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?!).
(Assignee)

Comment 2

4 years ago
Created attachment 8438089 [details] [diff] [review]
fix test_captive_portal_found_303.js to not redirect to example.org

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+
(Assignee)

Comment 5

4 years ago
Thanks for the fast review!

https://hg.mozilla.org/integration/mozilla-inbound/rev/ff950ef6212f
Assignee: nobody → nfroyd
Flags: in-testsuite+

Comment 6

4 years ago
https://hg.mozilla.org/mozilla-central/rev/ff950ef6212f
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
https://hg.mozilla.org/releases/mozilla-aurora/rev/e59ad1a713fa
https://hg.mozilla.org/releases/mozilla-beta/rev/8688d45141f6
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/46cbab3faf7d
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/634b8bb42eea
status-b2g-v1.3: --- → fixed
status-b2g-v1.3T: --- → fixed
status-b2g-v1.4: --- → fixed
status-b2g-v2.0: --- → fixed
status-b2g-v2.1: --- → fixed
status-firefox31: --- → fixed
status-firefox32: --- → fixed
status-firefox33: --- → fixed
status-firefox-esr24: --- → wontfix
You need to log in before you can comment on or make changes to this bug.