Changes

Jump to: navigation, search

Dive into Mozilla Fixing a Bug Lab

1,215 bytes added, 18:50, 28 February 2007
no edit summary
[[Dive into Mozilla]] > [[Dive into Mozilla Day 4]] > Fixing a Bug Lab
== Overview ==
Deleting This lab is designed to give you first item -hand experience trying to fix a JavaScript bug in History Sidebar causes no item have focusthe browser. You will work on an existing bug that has already been solved. This will allow you to compare your work to that of the fix.
Deleting any other item sets focus on the next item after the deleted one (andthat is correct).== Instructions ==
Reproducible* Read the description of the following bug, and make sure you can reproduce the behaviour in your browser. '''Use Firefox 2 and not your trunk build to test, since trunk has it fixed''': Always
Deleting first item in History Sidebar causes no item have focus. Deleting any other item sets focus on the next item after the deleted one (and that is correct). Reproducible: Always Steps to Reproduce: 1. Open history sidebar 2. Sort items by date 3. Delete category Today (which is certainly the first one) You can alternatively use history search and delete fist item found. Actual Results: None of items or categories have focus. Expected Results: Focus should be set on the next item after deleted one.
You can alternatively use history search * Since the bug has already been fixed, we need to roll-back to an earlier version of the file from CVS. ''NOTE: at the time of writing (February 28, 2007), the most recent version of nsTreeController.js was 1.5, and delete fist item foundwe need 1.4'':
Actual Results $ cd mozilla/toolkit/obsolete/content $ cvs update -j1.5 -j1.4 nsTreeController.js RCS file: /cvsroot/mozilla/toolkit/obsolete/content/nsTreeController.js,v retrieving revision 1.5 retrieving revision 1.4None of items or categories have focus Merging differences between 1.5 and 1.4 into nsTreeController.js
Expected Results: Focus should be set on * Using the next item after deleted onedebugging tools and techniques we learned earlier, see if you can isolate and fix this bug in nsTreeController.js.
'''Try to avoid the temptation to look at the patch until you have finished!'''
  Bughttps://bugzilla.mozilla.org/show_bug.cgi?id=318532 Need to roll-back the changes$ cd mozilla/toolkit/obsolete/contentcvs update -j1.5 -j1.4 nsTreeController.js Bonsai= Resources ==* [http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/toolkit/obsolete/content/nsTreeController.js&rev=HEAD&mark=1.5Bonsai, showing the checked-in patch (1.5)]* [https://bugzilla.mozilla.org/show_bug.cgi?id=318532 Bug 318532]

Navigation menu