зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543095 - Pass `frameId` to all Page events. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D28957 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5a549b8d58
Коммит
ff0fe13c9f
|
@ -119,10 +119,10 @@ class Page extends ContentProcessDomain {
|
|||
break;
|
||||
|
||||
case "pageshow":
|
||||
this.emit("Page.loadEventFired", {timestamp});
|
||||
this.emit("Page.loadEventFired", {timestamp, frameId});
|
||||
// XXX this should most likely be sent differently
|
||||
this.emit("Page.navigatedWithinDocument", {timestamp});
|
||||
this.emit("Page.frameStoppedLoading", {timestamp});
|
||||
this.emit("Page.navigatedWithinDocument", {timestamp, frameId, url});
|
||||
this.emit("Page.frameStoppedLoading", {timestamp, frameId});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,16 @@ async function testCDP() {
|
|||
is(frameNavigated.frame.url, url, "frameNavigated url is the same being given to " +
|
||||
"Page.navigate");
|
||||
|
||||
const navigatedWithinDocument = resolutions.get("navigatedWithinDocument");
|
||||
is(navigatedWithinDocument.frameId, frameId, "navigatedWithinDocument frameId is " +
|
||||
"the same than the one returned by Page.navigate");
|
||||
is(navigatedWithinDocument.url, url, "navigatedWithinDocument url is the same than " +
|
||||
"the one being given to Page.navigate");
|
||||
|
||||
const frameStoppedLoading = resolutions.get("frameStoppedLoading");
|
||||
is(frameStoppedLoading.frameId, frameId, "frameStoppedLoading frameId is the same " +
|
||||
"than the one returned by Page.navigate");
|
||||
|
||||
await client.close();
|
||||
ok(true, "The client is closed");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче