GCLI needs a restart command

RESOLVED FIXED

Status

()

Firefox
Developer Tools: Console
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Optimizer, Assigned: Optimizer)

Tracking

Trunk
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gclicommands], URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
a simple restart command
>> restart
- restarts the browser
>> restart 23
- restarts after 23 seconds
>> restart --abort
- aborts the scheduled restart by the above command

I am attaching the url to gist, and will shortly add the patch.
(Assignee)

Comment 1

5 years ago
Created attachment 636859 [details] [diff] [review]
Patch v1.0
Attachment #636859 - Flags: feedback?(jwalker)
Comment on attachment 636859 [details] [diff] [review]
Patch v1.0

I'm wondering what the use-case it for delayed restart. I get that on unix, there's value in allowing other users to log out, but is there a similar requirement for a web browser?

Thanks.
Attachment #636859 - Flags: feedback?(jwalker)
Blocks: 768998
(Assignee)

Comment 3

5 years ago
I cannot think of a good use case for delayed restart, but a normal restart and an option for a restart with disabling fast load cache is a good option for developers.
So I've just done reviewing all the commands we created in the hack day and I'd like to add this to the firefox command line, but I think we need to do a few things first:
- Remove the delayed restart and abort options which should make the code much
  simpler
- Add unit tests - for which I've written a bunch of docs:
  https://developer.mozilla.org/en/Tools/GCLI/Writing_GCLI_Commands

We've got just over a week to get this in for Firefox 16 - what do you think?
Filter on teabags
Whiteboard: [gclicommands]
(Assignee)

Comment 6

5 years ago
Created attachment 637986 [details] [diff] [review]
Patch v2.0 with tests

Updated with tests for input status.
Removed delayed restart and thus abort restart support.
Changed FastLoadCache name to nocache.
changed output type to string.

Passes all tests on local build.
Attachment #636859 - Attachment is obsolete: true
Attachment #637986 - Flags: review?(jwalker)
Comment on attachment 637986 [details] [diff] [review]
Patch v2.0 with tests

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

Looks good to me
Thanks.
Attachment #637986 - Flags: review?(jwalker) → review+
Added to master patch in bug 768998
Copy / paste error ... added to master patch in but 771555.
(Assignee)

Comment 10

5 years ago
this should be fixed now ?
Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20120823 Firefox/16.0

I tried to use restart command with the "--nocache" argument, but the argument does not autocomplete when pressing TAB key: for example, I type "restart --n" and TAB, but doesn't autocomplete. Moreover, the "--n" is underlined with red and nocache argument is suggested as "[nocache]" (still, this doesn't work either).
(Assignee)

Comment 12

5 years ago
(In reply to Mihaela Velimiroviciu [QA] from comment #11)
> Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20120823 Firefox/16.0
> 
> I tried to use restart command with the "--nocache" argument, but the
> argument does not autocomplete when pressing TAB key: for example, I type
> "restart --n" and TAB, but doesn't autocomplete. Moreover, the "--n" is
> underlined with red and nocache argument is suggested as "[nocache]" (still,
> this doesn't work either).

Autocompletion of variable/options name is still not supported. Even if initially the --n is marked as error, as soon as you type full --nocache, it should no longer be an error. either way, you can simply type "restart true"
Also, the patch to fix options has just landed.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.