XUL Explorer:UseCases/Extension Testing: Difference between revisions

m
(timeline)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[XUL Explorer:Planning]]
=Extension Test mode=
=Extension Test mode=


Line 46: Line 47:
<tr>
<tr>
<td>Auto-locate Firefox profiles and Firefox executable</td>
<td>Auto-locate Firefox profiles and Firefox executable</td>
<td>Low</td>
<td style="background-color:yellow;text-align:center;">Low</td>
<td>
<td>
* This is probably a more difficult and time consuming feature to do, since it depends on the platform and where to check.
* This is probably a more difficult and time consuming feature to do, since it depends on the platform and where to check.
Line 53: Line 54:
<tr>
<tr>
<td>Read values from prefs.js</td>
<td>Read values from prefs.js</td>
<td>Medium</td>
<td style="background-color:green;text-align:center;">Done / Medium</td>
<td>
<td>
* Done
* Save information so app doesn't have to auto-locate executable/ask user each time</td>
* Save information so app doesn't have to auto-locate executable/ask user each time</td>
</tr>
</tr>
<tr>
<tr>
<td>Pick files (firefox executable)/directories (profile directory)</td>
<td>Pick files (firefox executable)/directories (profile directory)</td>
<td>High</td>
<td style="background-color:green;text-align:center;">Done / High</td>
<td>Done</td>
<td>Done</td>
</tr>
</tr>
<tr>
<tr>
<td>Locate root directory of extension</td>
<td>Locate root directory of extension</td>
<td>High</td>
<td style="background-color:green;text-align:center;">Done / High</td>
<td>Needed to write in text file. This is tricky because it should point to the same directory as application.ini, but where that file is isn't always relative to the current file. So we have a few options
<td>Needed to write in text file. This is tricky because it should point to the same directory as application.ini, but where that file is isn't always relative to the current file. So we have a few options
* Go through each tab for a file named application.ini, and take it's document.title
* Go through each tab for a file named application.ini, and take it's document.title
* Have the user locate by hand (but this shouldn't be saved to prefs.js
* Have the user locate by hand (but this shouldn't be saved to prefs.js
I am leaning towards option #1</td>
I am leaning towards option #1
Mark Finkle and shaver suggest option #2, but have also suggested defaulting to the last picked directory. Which seems fair</td>
</tr>
</tr>
<tr>
<tr>
<td>locate extension id</td>
<td>locate extension id</td>
<td>High</td>
<td style="background-color:green;text-align:center;">Done / High</td>
<td>Read application.ini/install.rdf, but how?</td>
<td>Read application.ini/install.rdf, but how? I have managed to finish application.ini, since it only relies on [http://mxr.mozilla.org/seamonkey/source/xulrunner/setup/nsXULAppInstall.js#61 undocumented] [http://mxr.mozilla.org/seamonkey/source/xpcom/ds/nsIINIParser.idl#43 interfaces]. I have no clue right now on RDF, but Mark Finkle pointed to possible [http://www.xulplanet.com/downloads/rdfds/ help].</td>
</tr>
</tr>
<tr>
<tr>
<td>create text file/directory</td>
<td>create text file/directory</td>
<td>Medium</td>
<td style="background-color:green;text-align:center;">Done / Medium</td>
<td>Create a directory/text file. I don't think this will be difficult at all</td>
<td>Create a directory/text file. I don't think this will be difficult at all
* resource : [http://developer.mozilla.org/en/docs/Code_snippets:File_I/O File I/O]</td>
</tr>
</tr>
<tr>
<tr>
<td>Launch Firefox</td>
<td>Launch Firefox</td>
<td>Medium</td>
<td style="background-color:green;text-align:center;">High / Medium</td>
<td>Not sure how to do this yet</td>
<td>Not sure how to do this yet
* resource : [http://developer.mozilla.org/en/docs/Code_snippets:Running_applications Running applications]</td>
</tr>
</tr>
<tr>
<tr>
<td>Wait for Firefox to close and delete file/directory</td>
<td>Wait for Firefox to close and delete file/directory</td>
<td>High</td>
<td style="background-color:green;text-align:center;">Done poorly / High</td>
<td>Important, but not sure how to do this either. If I figure out how to launch Firefox, there will probably be an easy way to catch when it is closed.</td>
<td>Important, but not sure how to do this either. If I figure out how to launch Firefox, there will probably be an easy way to catch when it is closed.</td>
</tr>
</table>
Welcome feedback received, which I am posting along here :
<table style="width:100%" border="1">
<tr>
<th>Task</th>
<th>Priority</th>
<th>Status</th>
</tr>
<tr>
<td>Move code out of extensionTestManager to XE for better reuse (for example, move out the UI code for CL interfaces, and prefs settings).</td>
<td style="background-color:green;text-align:center;">Done / Medium</td>
<td>prefs and prompts are in the utils/ directory.</td>
</tr>
<tr>
<td>Need more explanation about each step, since it is very subtle right now (dialog titlebar). Mark Finkle recommended a wizard.</td>
<td style="background-color:green;text-align:center;">Done / High</td>
<td>
*A wizard has been completed. There is one shot for intro, 3 shots for executable/profile/root, and a window for confirmation. Maybe this is too much? Looking for suggestions!
*Just finished localizing the parts that I have changed.</td>
</tr>
<tr>
<td>
Pass “profile path” and “firefox path” to extensionTestManager, rather then extensionTestManager try to find these itself
</td>
<td style="background-color:green;text-align:center;">Done(?) / Medium</td>
<td>
*this has sort of been done. Rather then trying to find out the executable/profile path in XE, it has been moved to the more logical place. The wizard. It passes back stuff. We like stuff.
</td>
</tr>
<tr>
<td>Need to get rid of that rdf library</td>
<td style="background-color:green;text-align:center;">Done / Low</td>
<td>This is bothering the heck out of me. I shouldn't be using a 700 line rdf library and use it just once. But that would mean understanding RDF, which still isn't explained all that well, and even worse to try and develop with it.</td>
</tr>
<tr>
<td>''Future suggestion'' : install other extensions to help debug the current extension. For example, add venkman support if it is not already present.</td>
<td style="background-color:yellow;text-align:center;">Low</td>
<td>Not Completed</td>
</tr>
</tr>
</table>
</table>
Line 95: Line 139:
==Estimated Time of Delivery==
==Estimated Time of Delivery==


I have had a hell of a time finding the title of another tab (when I did a “Save All” functionality), and I gave up. So finding the root directory will probably take half a day. Locating the extension id will probably take the other half.
* I have had a hell of a time finding the title of another tab (when I did a “Save All” functionality), and I gave up. So finding the root directory will probably take half a day. Locating the extension id will probably take the other half.
Creating a text file and directory, I don't suspect will take very long. Maybe 2 hours at most.
* Creating a text file and directory, I don't suspect will take very long. Maybe 2 hours at most.
Launching firefox and waiting for it will probably take a full day.
* finding out how to work with .ini and .rdf files is taking a long time. I am working on this earlier than planned, so I don't think the finish date will change.
* Launching firefox and waiting for it will probably take a full day.
 
So two days? Meh, I'll make it Wednesday (Monday is a Canuck holiday)
 
'''Updated May 24, 2007'''
 
With feedback in mind :
 
* I haven't done a wizard yet, but the [http://www.xulplanet.com/tutorials/xultu/wizard.html documentation] assures me its easy
* Moving code around shouldn't take long
 
I'll try to make it a two day process (because it's a nice round number, unlike 1.5 days). I don't think it will take very long. Oh, but I have to read my own code. Make it 2.5 days. Round up. 3 days. Yeah. 3 days. Double it for debugging, 6 days. But wait for review 7 days. But I don't work weekends, so that's 1 week 2 days. But I have to go to the SSA office, and watch Building K, and I won't be productive, 8 days. Oh, but Monday is holiday, so I'll be finished in 1 week Thursday morning. But I said I like nice round numbers.
 
2 weeks.
 
=Documentation=
 
It is a pretty simple process.
 
The first time you run Extension Testing, it will prompt you for your firefox binary. It would also prompt for your profile that you would want to test under. This is suggested to be a different profile than your normal browsing profile. These two prompts are only asked once.


So two days? Meh, I'll make it Wednesday.
The last prompt will ask you for your extension directory, which should contain your install.rdf file. This would be asked each time. It will then try to run firefox with that extension. When you close firefox, that extension is removed from that profile (it should be safe, but I cannot guarantee anything :) )
78

edits