Closed Bug 1024585 Opened 10 years ago Closed 10 years ago

browser/devtools/commandline/test/browser_cmd_inject.js connects to ajax.googleapis.com

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox31 unaffected, firefox32 unaffected, firefox33 fixed, firefox-esr24 unaffected)

RESOLVED FIXED
Firefox 33
Tracking Status
firefox31 --- unaffected
firefox32 --- unaffected
firefox33 --- fixed
firefox-esr24 --- unaffected

People

(Reporter: froydnj, Assigned: gl)

References

Details

Attachments

(1 file)

In bug 995417, we are attempting to outlaw connecting to non-local hostnames during tests.  browser_cmd_inject.js explicitly connects to ajax.googleapis.com, resulting in failure with the patches from bug 995417 applied:

09:57:00     INFO -  Non-local network connections are disabled and a connection attempt to ajax.googleapis.com was made.  You should only access hostnames available via the test networking proxy (if running mochitests) or from a test-specific httpd.js server (if running xpcshell tests).
09:57:00     INFO -  TEST-INFO | Main app process: exit status 80000003
09:57:00  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/commandline/test/browser_cmd_inject.js | application terminated with exit code 2147483651

This test should be changed to use local test files only.
Assignee: nobody → gabriel.luong
Attached patch 1024585.patch (deleted) — Splinter Review
I decided to remove the offending test case first to unblock bug 995417. I will address injecting a test js file and testing if the function was added in a separate bug.
Attachment #8439375 - Flags: review?(jwalker)
Attachment #8439375 - Flags: review?(jwalker) → review+
That way to stop the test running works just fine.

It's worth mentioning some alternatives when you want to stop a test running:
This is the normal way:

http://dxr.mozilla.org/mozilla-central/source/browser/devtools/commandline/test/browser.ini#11

Also for GCLI commands you can use skipIf and skipRemainingIf:

http://dxr.mozilla.org/mozilla-central/source/browser/devtools/commandline/test/browser_gcli_exec.js#160
http://dxr.mozilla.org/mozilla-central/source/browser/devtools/commandline/test/browser_gcli_pref1.js#48
Keywords: checkin-needed
Also, I make that 59 mins from initial filing to patch - nice work.
Thanks for the rapid response!
Couldn't push to try earlier because the tree was closed.

https://tbpl.mozilla.org/?tree=Try&rev=2df76a0ede16
https://hg.mozilla.org/integration/fx-team/rev/4703e507f6cd

I tweaked your commit message to better fit with the guidelines below. Keep in mind that your commit message should be summarizing what the patch is doing, not restating the problem it's fixing :)
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities#Checkin_comment
Flags: in-testsuite-
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/4703e507f6cd
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: