Closed Bug 760703 Opened 8 years ago Closed 7 years ago

Avoid requesting help from MDN during testing and then leaking https://developer.mozilla.org/AppLinks/WebConsoleHelp?locale=en-US

Categories

(DevTools :: Console, defect)

13 Branch
defect
Not set

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dcamp, Assigned: dcamp)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Attached patch v1Splinter Review
The tests try to load an MDN page to test the help command.  Attached patch allows a pref to override the help uri and uses this in the test.
Attachment #629358 - Flags: review?(mihai.sucan)
Comment on attachment 629358 [details] [diff] [review]
v1

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

Looks good! Thanks for the patch!

::: browser/devtools/webconsole/HUDService-content.js
@@ +650,5 @@
>    {
> +    var url;
> +    try {
> +      url = Services.prefs.getCharPref("devtools.webconsole.helpURL");
> +    } catch(ex) {

nit: }\ncatch(ex) {

::: browser/devtools/webconsole/test/browser_webconsole_jsterm.js
@@ +96,5 @@
>    jsterm.clearOutput();
>  
>    let tabs = gBrowser.tabs.length;
>  
> +  Services.prefs.setCharPref("devtools.webconsole.helpURL", TEST_URI);

Nit: at the end of the test you should probably call clearUserPref().
Attachment #629358 - Flags: review?(mihai.sucan) → review+
https://tbpl.mozilla.org/php/getParsedLog.php?id=12505592&tree=Mozilla-Inbound&full=1#error0
Blocks: 438871
Summary: Avoid requesting help from MDN during testing → Avoid requesting help from MDN during testing and then leaking https://developer.mozilla.org/AppLinks/WebConsoleHelp?locale=en-US
Whiteboard: [orange]
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Whiteboard: [orange]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.