<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>To follow up here, this change has now landed (Bug 1522921). The change applies to mochitests and web platform tests. So in these test environments:</div><div><br></div><div>1) You can open the Browser Toolbox with the keyboard shortcut (ctrl+alt+shift+i or cmd+opt+shift+i) during a test, without flipping any prefs first<br></div><div>2) The input field on the Browser Console is automatically enabled during a test</div><div><br></div><div>I also landed the `--jsconsole` argument to the mochitest command to automatically open the Browser Console at test startup (Bug 1522916).<br></div><div><br></div><div>Brian<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 25, 2019 at 10:54 AM Brian Grinstead <<a href="mailto:bgrinstead@mozilla.com">bgrinstead@mozilla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is copied from <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1522921#c0" rel="noreferrer" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=1522921#c0</a>, but I’m posting it to the list to get feedback in case there’s a reason not to do it that I haven’t thought of.<br>
<br>
When I run a mochitest without the --jsdebugger arg, I sometimes still want to open the Browser Toolbox after the fact.<br>
<br>
This requires jumping through hoops, because the following prefs are false by default:<br>
<a href="https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713</a> due to <a href="https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/perf/user.js#44-45" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/perf/user.js#44-45</a> .<br>
<br>
So I need to manually go through steps to open it: <a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox#Enabling_the_Browser_Toolbox" rel="noreferrer" target="_blank">https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox#Enabling_the_Browser_Toolbox</a>. But I run out of time and the mochitest times out before I get very far.<br>
<br>
Some workarounds available:<br>
<br>
1) set up an [alias] in machrc like:<br>
mochitest = mochitest --setpref devtools.chrome.enabled=true --setpref devtools.debugger.remote-enabled=true --setpref devtools.debugger.prompt-connection=false<br>
2) Always run mochitest with --jsdebugger or with the above --setpref calls<br>
<br>
But I’m guessing this might be a common pain point, and suggest we should either:<br>
<br>
1) remove the overrides in <a href="https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/perf/user.js#44-45" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/perf/user.js#44-45</a>. We already do this for local builds at <a href="https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/devtools/shared/preferences/devtools-shared.js#27" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/devtools/shared/preferences/devtools-shared.js#27</a>)<br>
2) Unconditionally set them to true for mochitest only at <a href="https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713</a>.<br>
<br>
I’m leaning towards doing (2) since it’s a smaller change, and maybe other harnesses have a reason to not flip these.<br>
<br>
Thanks,<br>
Brian<br>
<br>
</blockquote></div>