Bug 1238311: Part 2 - Persist tab mutedInfo in sessionstore. r=ehsan

This commit is contained in:
Kris Maglione 2016-01-26 17:05:42 -08:00
parent 4e3ee4ed57
commit 127ae55171
3 changed files with 6 additions and 2 deletions

View File

@ -160,16 +160,19 @@ function* test_playing_icon_on_tab(tab, browser, isPinned) {
yield test_tooltip(icon, "Mute tab", isActiveTab);
ok(!("muted" in get_tab_state(tab)), "No muted attribute should be persisted");
ok(!("muteReason" in get_tab_state(tab)), "No muteReason property should be persisted");
yield test_mute_tab(tab, icon, true);
ok("muted" in get_tab_state(tab), "Muted attribute should be persisted");
ok("muteReason" in get_tab_state(tab), "muteReason property should be persisted");
yield test_tooltip(icon, "Unmute tab", isActiveTab);
yield test_mute_tab(tab, icon, false);
ok(!("muted" in get_tab_state(tab)), "No muted attribute should be persisted");
ok(!("muteReason" in get_tab_state(tab)), "No muteReason property should be persisted");
yield test_tooltip(icon, "Mute tab", isActiveTab);

View File

@ -2937,7 +2937,7 @@ var SessionStoreInternal = {
}
if (!!winData.tabs[t].muted != tabs[t].linkedBrowser.audioMuted) {
tabs[t].toggleMuteAudio();
tabs[t].toggleMuteAudio(winData.tabs[t].muteReason);
}
}
@ -3207,7 +3207,7 @@ var SessionStoreInternal = {
}
if (!!tabData.muted != browser.audioMuted) {
tab.toggleMuteAudio();
tab.toggleMuteAudio(tabData.muteReason);
}
if (tabData.lastAccessed) {

View File

@ -162,6 +162,7 @@ var TabStateInternal = {
if (browser.audioMuted) {
tabData.muted = true;
tabData.muteReason = tab.muteReason;
}
// Save tab attributes.