Closed Bug 735398 Opened 12 years ago Closed 12 years ago

Tabs in Attachments pane in preferences dialog don't persist last used tab causing Permanent Orange | test-attachments-pane.js | test_persist_tabs

Categories

(Thunderbird :: Preferences, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 13.0

People

(Reporter: mconley, Assigned: mconley)

Details

Attachments

(1 file)

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
Attached patch Patch v1Splinter Review
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.
Assignee: nobody → mconley
I've also updated the tests to account for the fact that we default in the "Outgoing" tab.
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.
Attachment #605492 - Flags: review?(dbienvenu)
Attachment #605492 - Flags: review?(dbienvenu) → review+
Committed to comm-central as http://hg.mozilla.org/comm-central/rev/a4020ebe7917
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: