зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1710356 - Removed hardcoded product name. r=whimboo,webdriver-reviewers
Removed hardcoded product name as firefox in "Browser.getVersion in remote/cdp/domains/parent/Browser.jsm Also updated tests at: - remote/cdp/test/browser/browser_cdp.js - remote/cdp/test/browser/browser_main_target.js Differential Revision: https://phabricator.services.mozilla.com/D120759
This commit is contained in:
Родитель
454f2cfc6a
Коммит
037cf1abd3
|
@ -26,7 +26,7 @@ class Browser extends Domain {
|
|||
].getService(Ci.nsIHttpProtocolHandler);
|
||||
return {
|
||||
protocolVersion: "1.3",
|
||||
product: (isHeadless ? "Headless " : "") + "Firefox",
|
||||
product: (isHeadless ? "Headless " : "") + Services.appinfo.name,
|
||||
revision: "1",
|
||||
userAgent,
|
||||
jsVersion: "1.8.5",
|
||||
|
|
|
@ -17,7 +17,7 @@ add_task(async function testCDP({ client }) {
|
|||
);
|
||||
is(
|
||||
version.product,
|
||||
isHeadless ? "Headless Firefox" : "Firefox",
|
||||
isHeadless ? "Headless Firefox" : Services.appinfo.name,
|
||||
"Browser.getVersion works and depends on headless mode"
|
||||
);
|
||||
is(
|
||||
|
|
|
@ -27,7 +27,9 @@ add_task(async function({ CDP }) {
|
|||
const { isHeadless } = Cc["@mozilla.org/gfx/info;1"].getService(
|
||||
Ci.nsIGfxInfo
|
||||
);
|
||||
const expectedProduct = isHeadless ? "Headless Firefox" : "Firefox";
|
||||
const expectedProduct = isHeadless
|
||||
? "Headless Firefox"
|
||||
: Services.appinfo.name;
|
||||
is(version.product, expectedProduct, "Browser.getVersion works");
|
||||
|
||||
const { webSocketDebuggerUrl } = await CDP.Version();
|
||||
|
|
Загрузка…
Ссылка в новой задаче