Closed Bug 768578 Opened 12 years ago Closed 12 years ago

GCLI needs a restart command

Categories

(DevTools :: Console, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Optimizer, Assigned: Optimizer)

References

()

Details

(Whiteboard: [gclicommands])

Attachments

(1 file, 1 obsolete file)

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.
Attached patch Patch v1.0 (obsolete) — Splinter Review
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: GCLICMD
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]
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+
Copy / paste error ... added to master patch in but 771555.
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).
(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
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: