зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646289 - [CDP] Share unique TabTarget id with WebDriver. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D139316
This commit is contained in:
Родитель
1122860dcd
Коммит
59bcc5d5fb
|
@ -13,6 +13,7 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
RemoteAgent: "chrome://remote/content/components/RemoteAgent.jsm",
|
||||
TabManager: "chrome://remote/content/shared/TabManager.jsm",
|
||||
TabSession: "chrome://remote/content/cdp/sessions/TabSession.jsm",
|
||||
Target: "chrome://remote/content/cdp/targets/Target.jsm",
|
||||
});
|
||||
|
@ -37,6 +38,10 @@ class TabTarget extends Target {
|
|||
|
||||
this.browser = browser;
|
||||
|
||||
// The tab target uses a unique id as shared with WebDriver to reference
|
||||
// a specific tab.
|
||||
this.id = TabManager.getIdForBrowser(browser);
|
||||
|
||||
// Define the HTTP path to query this target
|
||||
this.path = `/devtools/page/${this.id}`;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче