mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1238311: Part 2 - Persist tab mutedInfo in sessionstore. r=ehsan
--HG-- extra : commitid : HX9K6Rabf3v extra : rebase_source : 0cada35053441177863b89753e3c9a8968dc1908 extra : histedit_source : 07331d5b938d79c59dfd8789bb581e65f6a29d26
This commit is contained in:
parent
c1fb002168
commit
3543ac46b0
@ -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);
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -162,6 +162,7 @@ var TabStateInternal = {
|
||||
|
||||
if (browser.audioMuted) {
|
||||
tabData.muted = true;
|
||||
tabData.muteReason = tab.muteReason;
|
||||
}
|
||||
|
||||
// Save tab attributes.
|
||||
|
Loading…
Reference in New Issue
Block a user