Last Comment Bug 735398 - Tabs in Attachments pane in preferences dialog don't persist last used tab causing Permanent Orange | test-attachments-pane.js | test_persist_tabs
: Tabs in Attachments pane in preferences dialog don't persist last used tab ca...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: Thunderbird 13.0
Assigned To: Mike Conley (:mconley) - (Away until June 29th)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-13 12:42 PDT by Mike Conley (:mconley) - (Away until June 29th)
Modified: 2012-03-13 13:42 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v1 (3.40 KB, patch)
2012-03-13 12:44 PDT, Mike Conley (:mconley) - (Away until June 29th)
mozilla: review+
Details | Diff | Review

Description Mike Conley (:mconley) - (Away until June 29th) 2012-03-13 12:42:30 PDT
STR:

1)  Open up the Preferences dialog, and switch to the Attachments pane.
2)  The "Outgoing" tab should be selected by default
3)  Switch to the "Incoming" tab
4)  Close the Preferences dialog
5)  Re-open the Preferences dialog

What happens?

The "Outgoing" tab is selected in the Attachments pane.

What's expected?

Since the last tab we were on was the "Incoming" tab, we should go there.

This bug is showing up as an orange on comm-central as the following error:

SUMMARY-UNEXPECTED-FAIL | test-attachments-pane.js | test-attachments-pane.js::test_persist_tabs
  EXCEPTION: The first tab should have been selected: '0' != '1'.
    at: test-folder-display-helpers.js line 2855
       assert_true(false,"The first tab should have been selected: '0' != '1'.") test-folder-display-helpers.js 2855
       assert_equals(0,1,"The first tab should have been selected") test-folder-display-helpers.js 2842
            test-attachments-pane.js 42
       waitForPaneLoad([object Object]) test-pref-window-helpers.js 93
            frame.js 552
       WindowWatcher_notify([object XPCWrappedNative_NoHelper]) test-window-helpers.js 365
  EXCEPTION: The first tab selection should have been persisted: '0' != '1'.
    at: test-folder-display-helpers.js line 2855
       assert_true(false,"The first tab selection should have been persisted: '0' != '1'.") test-folder-display-helpers.js 2855
       assert_equals(0,1,"The first tab selection should have been persisted") test-folder-display-helpers.js 2842
            test-attachments-pane.js 66
       waitForPaneLoad([object Object]) test-pref-window-helpers.js 93
            frame.js 552
       WindowWatcher_notify([object XPCWrappedNative_NoHelper]) test-window-helpers.js 365
SUMMARY-PASS | test-attachments-pane.js::teardownModule
Comment 1 Mike Conley (:mconley) - (Away until June 29th) 2012-03-13 12:44:48 PDT
Created attachment 605492 [details] [diff] [review]
Patch v1

It looks like when retrieving the preference for which tab to display, we were treating the value 0 (as in tab index 0) as if the user had never viewed the tabs before.  This caused us to switch to the default.
Comment 2 Mike Conley (:mconley) - (Away until June 29th) 2012-03-13 12:45:13 PDT
I've also updated the tests to account for the fact that we default in the "Outgoing" tab.
Comment 3 Mike Conley (:mconley) - (Away until June 29th) 2012-03-13 12:46:10 PDT
Comment on attachment 605492 [details] [diff] [review]
Patch v1

Sorry to direct so many reviews at you today, David!

This causes the tests to pass for me locally.  Manual testing shows that the tabs are indeed persisting.
Comment 4 Mike Conley (:mconley) - (Away until June 29th) 2012-03-13 13:42:44 PDT
Committed to comm-central as http://hg.mozilla.org/comm-central/rev/a4020ebe7917

Note You need to log in before you can comment on or make changes to this bug.