mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 606936 - userTypedValue sticks around after session restore (favicon and star button missing) [r=dietrich, a=blocking2.0:final+]
This commit is contained in:
parent
bcd4485c7c
commit
4ba89e6849
@ -1459,13 +1459,6 @@ SessionStoreService.prototype = {
|
||||
tabData.pinned = true;
|
||||
else
|
||||
delete tabData.pinned;
|
||||
if (browser.userTypedValue) {
|
||||
tabData.userTypedValue = browser.userTypedValue;
|
||||
tabData.userTypedClear = browser.userTypedClear;
|
||||
} else {
|
||||
delete tabData.userTypedValue;
|
||||
delete tabData.userTypedClear;
|
||||
}
|
||||
return tabData;
|
||||
}
|
||||
|
||||
|
@ -39,28 +39,24 @@ function test() {
|
||||
let tab2 = gBrowser.addTab("about:credits");
|
||||
tab1.addEventListener("load", mainPart, true);
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
||||
function mainPart() {
|
||||
// Tell the session storer that the tab is pinned
|
||||
// and that userTypedValue is "Hello World!"
|
||||
let newTabState = '{"entries":[{"url":"about:robots"}],"pinned":true,"userTypedValue":"Hello World!"}';
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore);
|
||||
ss.setTabState(tab1, newTabState);
|
||||
|
||||
// Undo pinning and userTypedValue
|
||||
// Undo pinning
|
||||
gBrowser.unpinTab(tab1);
|
||||
tab1.linkedBrowser.userTypedValue = null;
|
||||
|
||||
is(tab1.linkedBrowser.__SS_data._tabStillLoading, true,
|
||||
"_tabStillLoading should be true.");
|
||||
|
||||
|
||||
// Close and restore tab
|
||||
gBrowser.removeTab(tab1);
|
||||
let savedState = JSON.parse(ss.getClosedTabData(window))[0].state;
|
||||
isnot(savedState.pinned, true, "Pinned should not be true");
|
||||
isnot(savedState.userTypedValue, "Hello World!",
|
||||
"userTypedValue should not be Hello World!");
|
||||
tab1 = ss.undoCloseTab(window, 0);
|
||||
|
||||
isnot(tab1.pinned, true, "Should not be pinned");
|
||||
|
Loading…
Reference in New Issue
Block a user