Bug 1618385: Use 'dom-complete' event instead to not miss 'navigate' event. r=ochameau,Honza

Differential Revision: https://phabricator.services.mozilla.com/D71881
This commit is contained in:
Daisuke Akatsuka 2020-04-23 23:53:32 +00:00
Родитель 11cbc02435
Коммит 55938be3e0
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -104,7 +104,6 @@ class FirefoxConnector {
this.removeListeners(); this.removeListeners();
this.currentTarget.off("will-navigate", this.willNavigate); this.currentTarget.off("will-navigate", this.willNavigate);
this.currentTarget.off("navigate", this.navigate);
this.webConsoleFront = null; this.webConsoleFront = null;
this.dataProvider = null; this.dataProvider = null;
@ -133,7 +132,6 @@ class FirefoxConnector {
// Paused network panel should be automatically resumed when page // Paused network panel should be automatically resumed when page
// reload, so `will-navigate` listener needs to be there all the time. // reload, so `will-navigate` listener needs to be there all the time.
targetFront.on("will-navigate", this.willNavigate); targetFront.on("will-navigate", this.willNavigate);
targetFront.on("navigate", this.navigate);
this.webConsoleFront = await this.currentTarget.getFront("console"); this.webConsoleFront = await this.currentTarget.getFront("console");
@ -309,6 +307,10 @@ class FirefoxConnector {
this.actions.addTimingMarker(event); this.actions.addTimingMarker(event);
} }
if (event.name === "dom-complete") {
this.navigate();
}
this.emitForTests(TEST_EVENTS.TIMELINE_EVENT, event); this.emitForTests(TEST_EVENTS.TIMELINE_EVENT, event);
} }