Closed Bug 773347 Opened 8 years ago Closed 7 years ago

GCLI hidden commands don't execute properly

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: jwalker, Assigned: jwalker)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 2 obsolete files)

No description provided.
Priority: P2 → P1
Summary: Hide the less useful GCLI commands → GCLI hidden commands don't execute properly
Target Milestone: Firefox 16 → Firefox 17
This bug is about fixing the mechanism for hiding bugs. Setting 'hidden:true' on a command or parameter was possible ages ago, but not included in unit tests, so the feature rotted.

The situation was that setting 'hidden:true' correctly removed a command from the completion, but also prevented it's execution because it didn't appear in any 'predictions' and so was marked ERROR.

This brings it back and adds tests.
Attached patch v1 (obsolete) — Splinter Review
The changes that you see in https://github.com/harthur/gcli/pull/3 are in this patch in:
- browser/devtools/commandline/gcli.jsm
- browser/devtools/commandline/test/browser_gcli_web.js

(GCLI contains a node script that builds these files from the GCLI sources)

Also this patch includes:
- Make the hidden state of 'cmd refresh' depend on whether the user has set
  the preference to point to a command directory.
- Now that hidden commands can be executed, I've removed the commenting out
  of the tests, so the commands are tested again.
Assignee: nobody → jwalker
Status: NEW → ASSIGNED
Attachment #642913 - Flags: review?(fayearthur)
Comment on attachment 642913 [details] [diff] [review]
v1

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

looks good, except for a maybe redundant test.

::: browser/devtools/commandline/test/browser_gcli_web.js
@@ +3071,5 @@
> +  });
> +
> +  helpers.setInput('tshidden');
> +  helpers.check({
> +    input:  'tshidden',

commented on the pull request, but it looks like the exact same test is here twice.
Attachment #642913 - Flags: review?(fayearthur) → review+
Attached patch v2 (obsolete) — Splinter Review
Removed duplicate test
Attachment #642913 - Attachment is obsolete: true
Attached patch v3Splinter Review
rebase
Attachment #648421 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/6b00d1edb2e7
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.