зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344857 - SessionStore does not return titles for tabs which have a url that is identical to the title, r=mikedeboer
MozReview-Commit-ID: H7dHJo6rOuz --HG-- extra : rebase_source : 6f4c483db21d659e84878f29bb1bb4e7ab6e3781
This commit is contained in:
Родитель
efd838dbde
Коммит
b945ec9ade
|
@ -155,6 +155,9 @@ add_task(function* test_about_page_navigate() {
|
|||
is(entries.length, 1, "there is one shistory entry");
|
||||
is(entries[0].url, "about:blank", "url is correct");
|
||||
|
||||
// Verify that the title is also recorded.
|
||||
is(entries[0].title, "about:blank", "title is correct");
|
||||
|
||||
browser.loadURI("about:robots");
|
||||
yield promiseBrowserLoaded(browser);
|
||||
|
||||
|
|
|
@ -146,13 +146,8 @@ var SessionHistoryInternal = {
|
|||
* @return object
|
||||
*/
|
||||
serializeEntry(shEntry) {
|
||||
let entry = { url: shEntry.URI.spec };
|
||||
let entry = { url: shEntry.URI.spec, title: shEntry.title };
|
||||
|
||||
// Save some bytes and don't include the title property
|
||||
// if that's identical to the current entry's URL.
|
||||
if (shEntry.title && shEntry.title != entry.url) {
|
||||
entry.title = shEntry.title;
|
||||
}
|
||||
if (shEntry.isSubFrame) {
|
||||
entry.subframe = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче