Closed Bug 915626 Opened 11 years ago Closed 11 years ago

Add marionette [chrome] script to restart gecko into a clean state

Categories

(Testing Graveyard :: JSMarionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: jlal, Assigned: fabrice)

Details

Attachments

(1 file)

      No description provided.
Flags: needinfo?(fabrice)
The equivalent of a new profile :)
Is that expected to work on user and eng builds on device?
Flags: needinfo?(fabrice)
b2g-desktop + eng builds for device (which hopefully means emulators will work)
Attached patch patchSplinter Review
With this patch I've been able to reset device builds in eng and user modes, as well as b2g-desktop builds.

The only thing that marionette will have to do is to notify observers with the "b2g-reset-profile" topic.
Assignee: nobody → fabrice
Attachment #806321 - Flags: review?(21)
++ this should be perfect I will test tomorrow
Comment on attachment 806321 [details] [diff] [review]
patch

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

One day we should split shell.js :)

::: b2g/chrome/content/shell.js
@@ +1349,5 @@
> +#ifdef MOZ_WIDGET_GONK
> +    let json = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
> +    json.initWithPath('/system/b2g/webapps/webapps.json');
> +    let toRemove = json.exists()
> +      // This is a user build, just rm -r /data/loca /data/b2g/mozilla

nit: loca -> local

@@ +1382,5 @@
> +      }
> +    }
> +#endif
> +
> +    Services.obs.removeObserver(clearProfile, topic);

Removing event/observer at the beginning of the function has always seems cleaner to me. Easy to check if it is really removed.
Attachment #806321 - Flags: review?(21) → review+
Pushed with nits fixed:
https://hg.mozilla.org/integration/b2g-inbound/rev/01a4e5ef9aa7

(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #6)

> 
> One day we should split shell.js :)

Yep, I started a patch moving out everything that doesn't depend on the Shell object itself, but never finished it...
https://hg.mozilla.org/mozilla-central/rev/01a4e5ef9aa7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: