зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1304941 - reconnect onTabChanged listener before fetching the tablist;r=jryans
MozReview-Commit-ID: FZYDKH3F21O --HG-- extra : rebase_source : 582f91c90362f6cffa932b1f7d49d46c061ac960
This commit is contained in:
Родитель
421514a83c
Коммит
5be1442c92
|
@ -42,6 +42,10 @@ add_task(function* () {
|
|||
yield waitForContentMutation(newTabTarget);
|
||||
}
|
||||
|
||||
// Then wait for title update, but on slow test runner, the title may already
|
||||
// be set to the expected value
|
||||
yield waitUntil(() => newTabTarget.title === TAB_URL);
|
||||
|
||||
// Check that the new tab appears in the UI
|
||||
is(newTabTarget.textContent, "foo", "The tab title got updated");
|
||||
is(newTabTarget.title, TAB_URL, "The tab tooltip is the url");
|
||||
|
|
|
@ -250,6 +250,12 @@ RootActor.prototype = {
|
|||
message: "This root actor has no browser tabs." };
|
||||
}
|
||||
|
||||
/*
|
||||
* Now that a client has requested the list of tabs, we reattach the onListChanged
|
||||
* listener in order to be notified if the list of tabs changes again in the future.
|
||||
*/
|
||||
tabList.onListChanged = this._onTabListChanged;
|
||||
|
||||
/*
|
||||
* Walk the tab list, accumulating the array of tab actors for the
|
||||
* reply, and moving all the actors to a new ActorPool. We'll
|
||||
|
@ -300,13 +306,6 @@ RootActor.prototype = {
|
|||
/* DebuggerServer.addGlobalActor support: name actors in 'listTabs' reply. */
|
||||
this._appendExtraActors(reply);
|
||||
|
||||
/*
|
||||
* Now that we're actually going to report the contents of tabList to
|
||||
* the client, we're responsible for letting the client know if it
|
||||
* changes.
|
||||
*/
|
||||
tabList.onListChanged = this._onTabListChanged;
|
||||
|
||||
return reply;
|
||||
});
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче