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:
Nafees Nehar 2021-07-29 20:34:51 +00:00
Родитель 454f2cfc6a
Коммит 037cf1abd3
3 изменённых файлов: 5 добавлений и 3 удалений

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

@ -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();