Open main menu

CDOT Wiki β

Changes

User:AaronMT

16,068 bytes added, 18:55, 26 January 2011
Pastebin
== Greetings ==<table><tr><td>[[Image:AaronMT.jpg]]</td><td>
Hello, my name is Aaron Train. I am a recent graduate of Computer Programming and Analysis. As of the previous winter (08), I have transferred into the BSD program to earn a degree. Currently, I am enrolled in a whole slew of different courses ranging from the 3rd to the 7th semester. I find open source fascinating, particularly Mozilla's projects as well as Canonical's Ubuntu GNU/Linux project.
I look forward to tinkering with the innards of Firefox, in DPS909. I also enjoy learning more about software development, open source and current/future web applications, and lastly modern programming languages.
* '''Name: '''Aaron Train
* '''Program: '''Bachelor of Software Development
* '''Hometown: '''Thornhill, Ontario
</td>
</tr>
</table>
== Contact ==
* Internet Relay Chat (IRC)
** '''AaronMT''' on IRC ([irc://irc.mozilla.org/seneca moznet#seneca] or [irc://irc.mozilla.org/seneca freenode#seneca])
* E-Mail
**'''Seneca E-Mail: '''amtrain at learn.senecac dot on dot ca'''
**'''Personal E-Mail: '''aaron dot train at gmail dot com'''
 
== Blog ==
* '''Open Source Weblog: '''[http://aaronmt.wordpress.com/ Aaron on Software]
 
= DPS909A - Fall 2008 =
After reading about many projects and finding my interests, I have selected a project that stands out for me as something I'd be willing to help contribute to and sounds like fun to work with in the process. I have an interest in computer security and this seems like a fit. I can relate to this function of the browser being implemented in a sense to how people want to surf anonymously in public areas. For example, if I *must* do some online banking while on a public terminal at school - privacy is a <u>must</u>
* '''Project: [http://zenit.senecac.on.ca/wiki/index.php/Contribute_to_Private_Browsing_Tests Contribute to Private Browsing tests] '''
*'''Main Contact''' [https://wiki.mozilla.org/User:Ehsan Ehsan Akhgari]
== Project for DPS909 ==
{| class="mediawiki sortable" border="1"
 
|-
!Project Name
!Description
!Leader(s)
!Community or Communities
|-
|[http://zenit.senecac.on.ca/wiki/index.php/Contribute_to_Private_Browsing_Tests Contribute to Private Browsing Tests]
|The new Private Browsing feature (see [https://bugzilla.mozilla.org/show_bug.cgi?id=248970 bug 248970] and the [https://wiki.mozilla.org/User:Ehsan/PrivateBrowsingTests test plan]) needs thorough tests written in order to insure its proper functionality. This will involve collaborating with those writing the patch and tests in order to develop a full suite of tests.
|[[User:AaronMT|Aaron Train]]
|Mozilla
|}
 
== Project Notes ==
* To run a single unit-test use '''check-one SOLO_FILE'''
** Example
<pre>mozilla-central$ make -C obj*/netwerk/test check-one SOLO_FILE=test_bug248970.js</pre>
 
== Deliverance for DPS909 ==
*[http://zenit.senecac.on.ca/wiki/index.php/Contribute_to_Private_Browsing_Tests Contribute to Private Browsing Tests]
 
== Contributions for DPS909 ==
* '''December'''
** Tested Jason (Slokunshialgo)'s Network Manager 0.3 release - Results: Connected to home wireless network <u>without</u> WPA enabled.
* '''November'''
** Submitted bug [https://bugzilla.mozilla.org/show_bug.cgi?id=465340 #465340]
* '''October'''
** Tested out 0.1 release of [http://zenit.senecac.on.ca/wiki/index.php/Talk:Canvas3D_XUL_Runner_App_0.1 Canvas 3D XUL Runner Application Browser] of [http://zenit.senecac.on.ca/wiki/index.php/User:Vesper Leonard Lee] - posted results.
** Participated in Mozilla Test Day for Firefox Bugday, Tuesday 10/21
** Tested patches on '''[https://bugzilla.mozilla.org/show_bug.cgi?id=457110 blocker bug #457110]''' that was necessary on patch 2.12 and prior in [https://bugzilla.mozilla.org/show_bug.cgi?id=248970 #248970 - private browsing]
** Tested Songbird with libtorrent extension of Anthony's [http://zenit.senecac.on.ca/wiki/index.php/User:Ashughes/BirdTorrent/TestResults#Birdtorrent_Test_Results Birdtorrent Test Results]
** Submitted Build Times for Patrick's [[Profile the build system]]
*** <pre>real 43m14.441s user 32m21.197s sys 2m50.695s </pre>
** Participated in Mozilla Test Day for Firefox 3.0.2
*** Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=456107 bug 456107]
** Aided [[User:Kwpark1|Park Ki-Won]] with his blog posting about [http://kwpark1.wordpress.com/2008/09/23/need-contributors-for-sqlite-project/ Need contributors for SQLite Project] by downloading the tool, checking the table and e-mailing him my *.sql file
 
== FSOSS 2008 Report ==
[http://zenit.senecac.on.ca/wiki/index.php/User:AaronMT/FSOSS_08 Free Software and Open Source Symposium 2008 Report]
 
== Bugs for DPS909==
== Labs ==
===Mozilla Labs ===
 
In preparation for [http://zenit.senecac.on.ca/wiki/index.php/DPS909_and_OSD600_Fall_2008_Weekly_Schedule#Week_3_.28Sept_15.29_-_Managing_and_Building_large_source_trees DPS909 - Lab #2 (Week 3)] I will outline my intended computer/OS that I will be documenting my process through the lab on ...
 
* '''Operating System: ''' [http://www.ubuntu.com Ubuntu 8.04 (Hardy Heron)]
* '''Computer Used: ''' [http://www.notebookreview.com/default.asp?newsID=3359&review=Dell+Inspiron+1501 Dell Inspiron 1501]
* '''Date Performed: ''' --[[User:AaronMT|AaronMT]] 18:10, 13 September 2008 (UTC)
 
==== Ubuntu GNU/Linux - Mozilla Build (Minefield 3.1b1pre) ====
 
The process involved in building Mozilla Firefox (Minefield 3.1b1pre) on Ubuntu GNU/Linux involved many steps (all of which are new to me entirely):
 
* Hardware
** 2048MB Ram and 15GB left on this Linux partition
* Preparation
** Make sure Ubuntu is up to date <pre>sudo apt-get install update</pre>
** Linux Build Prerequisites
*** <i>A recent POSIX Shell
*** A C++ compiler.
*** Perl 5.6 or higher. Older perl versions may work if you upgrade File::Spec to version 0.8
*** GNU make 3.79.1 or higher. Other varieties of "make" will not work.
*** CVS 1.11 or higher
*** the GTK2 widget toolkit
*** libXt-devel for X11/Intrinsic.h, X11/Shell.h
*** libIDL 0.6.3
*** zip 2.3
*** freetype 2.1.0
*** fontconfig
*** pkg-config 0.9.0 </i>
<i>Most if not all packages were installed with the following command</i>
<pre>apt-get build-dep firefox</pre>
<pre>sudo apt-get install libdbus-glib-1-dev curl</pre>
<pre>sudo apt-get install libcurl4-openssl-dev</pre>
====='''Obtaining the Mozilla-Central Source & Installing/Configuring Mercurial''' =====
The next step, should you choose to install Firefox 3.01+ is to grab [http://developer.mozilla.org/en/Mozilla_Source_Code_(Mercurial) Mercurial] and set it up properly.
* <pre>sudo apt-get install python-setuptools python-dev build-essential </pre>
* <pre>sudo easy_install -U mercurial</pre>
===== '''Configuration (Highly Suggested)'''=====
*It is highly suggested that you follow these configuration instructions [http://developer.mozilla.org/en/Installing_Mercurial here]
===== '''Fetching the latest trunk build of Firefox''' =====
*<pre>hg clone http://hg.mozilla.org/mozilla-central/ ~/Desktop/src</pre>
===== '''Building on Ubuntu GNU/Linux'''=====
[http://developer.mozilla.org/en/Configuring_Build_Options Configure] and build as usual using a .mozconfig file and make -f client.mk.
* My ~/.mozconfig
<pre># My first mozilla config
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-static --enable-shared</pre>
* Building!
<pre>cd ~/Desktop/src/
make -f client.mk build</pre>
* Running Firefox
<pre>cd ~/Desktop/src/obj-i686-pc-linux-gnu/dist/bin/
./firefox</pre>
* Total Build Time: <i>~ 45 minutes</i>
<p>[[Image:2.png|220px|Minefield 3.1b1pre]]</p>
----
 
==== Mozilla Ubiquity ====
Ubiquity Commands - <b>Work in Progress</b><br />
=====Display IP address=====
*<b>Displays users IP address immediately</b><br />
by [[User:AaronMT|AaronMT]]<br />
 
<b>Usage:</b> ip
 
Utilizes the whatismyip website to parse the IP and display it right in the console
 
<pre>
CmdUtils.CreateCommand({
name: "ip",
homepage: "http://aaronmt.wordpress.com",
author: { name: "Aaron Train", email: "aaron.train@gmail.com"},
description: "Displays your internal IP address.",
help: "Just type IP",
icon: "http://whatismyip.com/favicon.ico",
preview: function(pblock) {
var url = "http://whatismyip.com/automation/n09230945.asp";
jQuery.get( url, function(data) {
pblock.innerHTML = data;
});
},
execute: function() {
var url = "http://whatismyip.com";
Utils.openUrlInBrowser(url);
},
});
</pre>
 
=====Search MedicineNet=====
*<b>Searches MedicineNet with a given keyword</b>
by [[User:AaronMT|AaronMT]]<br />
 
<b>Usage:</b> health <i>keyword phrase</i>
<pre>CmdUtils.CreateCommand(
{
name: "health",
homepage: "http://medicinenet.com",
author: { name: "Aaron Train", email: "aaron.train@gmail.com" },
description: "Takes keyword phrase and searches MedicineNet",
help: "health <i>keyword phrase</i>",
icon: "http://images.medicinenet.com/images/fav/MN.ico",
takes: {"Enter a noun": noun_arb_text},
preview: function(pblock, keywordPhrase)
{
pblock.innerHTML = "Search the MedicineNet by entering any phrase <b>" + keywordPhrase.text + "</b>"
},
 
execute: function(keywordPhrase)
{
var searchURL = "http://www.medicinenet.com/" + keywordPhrase.text;
Utils.openUrlInBrowser(searchURL);
}
});
</pre>
 
=====<b>Pastebin</b><br />=====
* <i>Transfers selected text to a new pastebin</i>><br />
<b>Usage:</b> <i>pb</i>
<pre>CmdUtils.CreateCommand({
name: "pb",
homepage: "http://aaronmt.wordpress.com",
author: { name: "Aaron Train", email: ""},
description: "Transfers selected text to a new Pastebin.",
help: "Selected text will be sent to a new Pastebin",
icon: "http://pastebin.ca/pastebin.ico",
preview: function(pblock) {
var text=context.focusedWindow.document.getSelection();
var url = "http://pastebin.ca";
},
execute: function() {
var url = "http://pastebin.ca";
var text=context.focusedWindow.document.getSelection();
displayMessage(text);
Utils.openUrlInBrowser(url);
},
});</pre>
 
==== Real World Mozilla Source Code Reading Lab ====
For this lab, I have selected the browser function, ''Bookmarks -> Bookmark This Page'' and have done a little digging in the latest Mozilla Trunk build to find out where the functionality is situated deep within the Mozilla code.  What my digging through [http://mxr.mozilla.org Mozilla Cross Reference] has uncovered: An initial search for ''Bookmark This Page'' revealed.. * [http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/chrome/browser/browser.dtd#62 browser.dtd]** <pre><!ENTITY bookmarkThisPageCmd.label "Bookmark This Page"></pre>* [http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-menubar.inc#409 browser-menubar.inc]** <pre> <menuitem label="&bookmarkThisPageCmd.label;" command= Contact "Browser:AddBookmarkAs" key="addBookmarkAsKb"/></pre>* [http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#1240 browser.js]**<pre>// Disable inappropriate commands / submenus var disabledItems =[''Browser:AddBookmarkAs'];</pre> My search led me to browser.js but I could not find anything related to AddBookmarkAs. ==== Bugs, Bugzilla, and Debugging ==== For this lab, I will look at the primary bug associated with my project: [https://bugzilla.mozilla.org/show_bug.cgi?id=248970 Bug #248970] Bug associated with [https://bugzilla.mozilla.org/show_bug.cgi?id=248970 Bug #248970]* '''Depends On'''** [https://bugzilla.mozilla.org/show_bug.cgi?id=456884 Bug #456884] - Provide a way to open a link to Private Browsing Mode** [https://bugzilla.mozilla.org/show_bug.cgi?id=457110 Bug #457110] - Support in-memory DB for the downloads manager back-end* '''Blocker'''** [https://bugzilla.mozilla.org/show_bug.cgi?id=454792 Bug #454792] - Should safe browsing code react to private browsing mode? ==== Bug Fixing with Mozilla Thunderbird 3.0b1pre ==== [[Image:Tbshredder.png]] *For this lab, I downloaded a fresh trunk build of Mozilla Thunderbird 3.0b1pre from mercurial.<pre>hg clone http://hg.mozilla.org/comm-central/ src</pre> *Once the repository had been cloned, I updated <pre>python client.py checkout</pre> *This essentially, pulls the core mozilla-central codebase (Firefox 3.1/xulrunner 1.9.1) into mozilla/ and pulls the following directories from cvs (the directories prefixed by extensions/ go into mozilla/extensions):** calendar** extensions/irc (Chatzilla)** extensions/typeaheadfind** extensions/venkman** extensions/wallet** directory/c-sdk*Using the following ~/.mozconfig, I built Mozilla Thunderbird / Shredder 3.01b1pre <pre>mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ ac_add_options --disable-optimize ac_add_options --enable-debug ac_add_options --disable static --enable-shared ac_add_options --enable-application=mail</pre> *Next, I tested the bug** Notice the mishandling of proper hyper linking. The text that <u>is</u> hyper linked should not be.[[Image:Tbshredderbug.png‎ ]] *Next, I submitted a bug on Bugzilla** [https://landfill.bugzilla.org/bugzilla-3.0-branch/show_bug.cgi?id=6817 Bug #6817] *Following that, I began to scour for the cause of this bug looking through the hinted '''mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp'''and found the line, [http://mxr.mozilla.org/mozilla-central/source/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#197 #197], with the following condition<pre>if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....</pre> *For this function to perform properly, the line needs to be changed to <pre>if ((inString.FindChar('.', pos) != kNotFound) && (inString.Find("..",0)==kNotFound))</pre> *Next, I created a patch for the solution by executing the following <pre>hg diff -p -U 8 > patch.txt</pre> The contents of the patch containing the solution to the problem can be found here, [https://landfill.bugzilla.org/bugzilla-3.0-branch/attachment.cgi?id=980 Bug #6817 - Patch] *Lastly, I submitted my patch to my created bug on Bugzilla, asking for review from David.Humphrey. ==== Dive into Mozilla Modifying Firefox using an Extension Lab ====Experience + Code Used found herehttp://aaronmt.wordpress.com/2008/10/28/lab-7-modifying-mozilla-firefoxs-tab-behaviour/ ==== Modify the Browser - Extensions ====The following is an extension written in November 2008, Week 8 of DPS909.'''addtabbrowser.xpi''' - 'Add Tab Browser' is a very minimalistic extension that modifies the behavior of the placement of tabs after they open. Behavior of tabs is altered in that new tabs are placed after the currently selected tab, rather than placed at the very end of the tab list. This extension was written as an introduction into the world of writing extensions and modifying behavior of Mozilla Firefox. <font color="green">'''Download link here:'''</font> [http://zenit.senecac.on.ca/wiki/imgs/Addtabbeside.xpi Addtabbeside.xpi‎] (file size: 2 KB, MIME type: application/x-xpinstall) File contents contained within <font color="green">'''addtabbeside.xpi'''</font> * '''addtabbeside@senecac.on.ca'''** '''chrome.manifest'''** '''install.rdf'''***'''chrome'''****'''content'''*****'''addtabbeside.js'''*****'''overlay.xul'''  <font color="green">'''Install instructions:'''</font> Drag addtabbeside.xpi into your main browser. The addons install manager will detect and properly install the extension.  <font color="red">'''Removal instructions:'''</font> Tools -> Addons -> Uninstall -> Restart the browser ==== XPCOM - Extension ====[[Image:Xpcom_success.png‎]]*Download the *.xpi here: [http://zenit.senecac.on.ca/wiki/imgs/Firstxpcom_AaronMT.xpi http://zenit.senecac.on.ca/wiki/imgs/Firstxpcom_AaronMT.xpi]**http://aaronmt.wordpress.com/2008/11/15/my-first-xpcom-extension-lab/ ==== XPCOM - Chrome ====[[Image:Chrome_aaronmt.jpg|10p]]* firstxpcomchrome.zip [http://zenit.senecac.on.ca/wiki/imgs/Firstxpcomchrome.zip http://zenit.senecac.on.ca/wiki/imgs/Firstxpcomchrome.zip] == Bugs ===== Ubuntu ===[http://tinyurl.com/3h8fnv] Bugs I have reported=== Firefox ===[http://tinyurl.com/3gfv6q] Bugs I have reported
Email= External Projects =I am deeply passionate with the [http: amtrain@learn//www.senecacubuntu.oncom Ubuntu] project. Having first used it in its infancy and being involved with the community, collaborating with the community to better the product has been a hobby and passion of mine for the past few years. I have been contributing to many tutorials and solutions in the community, such as:<ul><li>[http://tinyurl.com/4fbvhj Fixing laptop brightness in Ubuntu 8.ca04]<br/li></ul>MSN<ul><li>[http: aaron//tinyurl.train@rogerscom/3pe4ro Collaborating on a fixes for laptop suspend issues in Ubuntu 7.com10]<br/li>IRC: AaronMT<br/ul>
1
edit