Private Browsing Add-on Compatibility Checker: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
(Explicitly mention that checker needs to quit Firefox)
mNo edit summary
 
Line 35: Line 35:
=== Finishing the test and report generation  ===
=== Finishing the test and report generation  ===


In this stage, checker needs to [https://developer.mozilla.org/En/Supporting_private_browsing_mode#Turning_private_browsing_on_and_off turn off the private browsing mode].&nbsp; Then, it needs to spawn the reporting utility, and [https://developer.mozilla.org/en/How_to_Quit_a_XUL_Application quit Firefox] to release any possible file locks inside the active profile directory.&nbsp; The reporter application should [https://developer.mozilla.org/en/nsIProcess#Attributes wait until Firefox has exited], and then start its job.<br>In order to use the same set of skills which is required to build the checker extension, and to keep everything portable to all the platforms that we support, it is advised to write the reporting application as a [http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx XUL&nbsp;application].&nbsp; In this case, checker can [https://developer.mozilla.org/en/Code_snippets/Running_applications run] the XUL&nbsp;reporter application, and pass it the domains and URLs collected in the second phase as arguments.&nbsp; In order not to be forced to ship a separate [https://developer.mozilla.org/en/XULRunner xulrunner] runtime, [https://developer.mozilla.org/en/XULRunner_tips#Using_Firefox_3_to_run_XULRunner_applications Firefox itself can be used to run the XUL&nbsp;application].&nbsp; You should however note that you need to specify another profile when running the reporter application, because the entire point behind launching a separate program is to make sure that no file in the active profile directory is being locked.&nbsp; This can be done by [https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIFile/createUnique creating a temporary directory] and using a command line like this to launch Firefox:  
In this stage, checker needs to [https://developer.mozilla.org/En/Supporting_private_browsing_mode#Turning_private_browsing_on_and_off turn off the private browsing mode].&nbsp; Then, it needs to spawn the reporting utility, and [https://developer.mozilla.org/en/How_to_Quit_a_XUL_Application quit Firefox] to release any possible file locks inside the active profile directory.&nbsp; The reporter application should [https://developer.mozilla.org/en/nsIProcess#Attributes wait until Firefox has exited], and then start its job.
 
In order to use the same set of skills which is required to build the checker extension, and to keep everything portable to all the platforms that we support, it is advised to write the reporting application as a [http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx XUL&nbsp;application].&nbsp; In this case, checker can [https://developer.mozilla.org/en/Code_snippets/Running_applications run] the XUL&nbsp;reporter application, and pass it the domains and URLs collected in the second phase as arguments.&nbsp; In order not to be forced to ship a separate [https://developer.mozilla.org/en/XULRunner xulrunner] runtime, [https://developer.mozilla.org/en/XULRunner_tips#Using_Firefox_3_to_run_XULRunner_applications Firefox itself can be used to run the XUL&nbsp;application].&nbsp; You should however note that you need to specify another profile when running the reporter application, because the entire point behind launching a separate program is to make sure that no file in the active profile directory is being locked.&nbsp; This can be done by [https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIFile/createUnique creating a temporary directory] and using a command line like this to launch Firefox:  
<pre>/path/to/firefox -profile /path/to/tmp/dir -app /path/to/reporter/application.ini
<pre>/path/to/firefox -profile /path/to/tmp/dir -app /path/to/reporter/application.ini
</pre>  
</pre>  
Confirmed users
657

edits

Navigation menu