Bug 1713442 - [remote] Rename all messagehandler test modules to follow the correct naming pattern r=webdriver-reviewers,whimboo

Depends on D120640

Differential Revision: https://phabricator.services.mozilla.com/D122224
This commit is contained in:
Julian Descottes 2021-08-10 21:34:23 +00:00
Родитель aed2bec56c
Коммит 6cbdd03533
11 изменённых файлов: 33 добавлений и 25 удалений

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

@ -24,7 +24,7 @@ add_task(async function test_broadcasting_only_content_process() {
"session-id-broadcasting_only_content_process"
);
const broadcastValue = await sendTestBroadcastCommand(
"TestOnlyInWindowGlobalModule",
"commandwindowglobalonly",
"testBroadcast",
{},
rootMessageHandler

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

@ -20,7 +20,7 @@ add_task(async function test_broadcasting_two_tabs_command() {
);
const broadcastValue = await sendTestBroadcastCommand(
"TestOnlyInWindowGlobalModule",
"commandwindowglobalonly",
"testBroadcast",
{},
rootMessageHandler

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

@ -20,7 +20,7 @@ add_task(async function test_broadcasting_two_tabs_with_params_command() {
);
const broadcastValue = await sendTestBroadcastCommand(
"TestOnlyInWindowGlobalModule",
"commandwindowglobalonly",
"testBroadcastWithParameter",
{
value: "some-value",

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

@ -21,7 +21,7 @@ add_task(async function test_broadcasting_two_windows_command() {
"session-id-broadcasting_two_windows_command"
);
const broadcastValue = await sendTestBroadcastCommand(
"TestOnlyInWindowGlobalModule",
"commandwindowglobalonly",
"testBroadcast",
{},
rootMessageHandler

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

@ -15,7 +15,7 @@ add_task(async function test_broadcasting_with_frames() {
"session-id-broadcasting_with_frames"
);
const broadcastValue = await sendTestBroadcastCommand(
"TestOnlyInWindowGlobalModule",
"commandwindowglobalonly",
"testBroadcast",
{},
rootMessageHandler

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

@ -17,7 +17,7 @@ add_task(async function test_module_error() {
info("Call a module method which will throw");
try {
await rootMessageHandler.handleCommand({
moduleName: "TestOnlyInWindowGlobalModule",
moduleName: "commandwindowglobalonly",
commandName: "testError",
destination: {
type: WindowGlobalMessageHandler.type,
@ -45,7 +45,7 @@ add_task(async function test_destination_error() {
"No browsing context matches fakeBrowsingContextId"
);
await rootMessageHandler.handleCommand({
moduleName: "TestOnlyInWindowGlobalModule",
moduleName: "commandwindowglobalonly",
commandName: "testOnlyInWindowGlobal",
destination: {
type: WindowGlobalMessageHandler.type,

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

@ -14,7 +14,7 @@ const { WindowGlobalMessageHandler } = ChromeUtils.import(
add_task(async function test_rootModule_command() {
const rootMessageHandler = createRootMessageHandler("session-id-rootModule");
const rootValue = await rootMessageHandler.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testRootModule",
destination: {
type: RootMessageHandler.type,
@ -39,7 +39,7 @@ add_task(async function test_windowglobalInRootModule_command() {
"session-id-windowglobalInRootModule"
);
const interceptedValue = await rootMessageHandler.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testInterceptModule",
destination: {
type: WindowGlobalMessageHandler.type,
@ -65,7 +65,7 @@ add_task(async function test_windowglobalModule_command() {
"session-id-windowglobalModule"
);
const windowGlobalValue = await rootMessageHandler.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testWindowGlobalModule",
destination: {
type: WindowGlobalMessageHandler.type,
@ -92,7 +92,7 @@ add_task(async function test_windowglobalOnlyModule_command() {
"session-id-windowglobalOnlyModule"
);
const windowGlobalOnlyValue = await rootMessageHandler.handleCommand({
moduleName: "TestOnlyInWindowGlobalModule",
moduleName: "commandwindowglobalonly",
commandName: "testOnlyInWindowGlobal",
destination: {
type: WindowGlobalMessageHandler.type,
@ -125,7 +125,7 @@ add_task(async function test_multisession() {
info("Set value for session 1");
await rootMessageHandler1.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testSetValue",
destination: {
type: WindowGlobalMessageHandler.type,
@ -136,7 +136,7 @@ add_task(async function test_multisession() {
info("Set value for session 2");
await rootMessageHandler2.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testSetValue",
destination: {
type: WindowGlobalMessageHandler.type,
@ -146,7 +146,7 @@ add_task(async function test_multisession() {
});
const session1Value = await rootMessageHandler1.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testGetValue",
destination: {
type: WindowGlobalMessageHandler.type,
@ -161,7 +161,7 @@ add_task(async function test_multisession() {
);
const session2Value = await rootMessageHandler2.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testGetValue",
destination: {
type: WindowGlobalMessageHandler.type,
@ -187,7 +187,7 @@ add_task(async function test_forwarding_command() {
const rootMessageHandler = createRootMessageHandler("session-id-forwarding");
const interceptAndForwardValue = await rootMessageHandler.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testInterceptAndForwardModule",
destination: {
type: WindowGlobalMessageHandler.type,

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

@ -4,9 +4,9 @@
"use strict";
const EXPORTED_SYMBOLS = ["TestModule"];
const EXPORTED_SYMBOLS = ["command"];
class TestModule {
class Command {
constructor(messageHandler) {
this.messageHandler = messageHandler;
}
@ -21,3 +21,5 @@ class TestModule {
return "root-value";
}
}
const command = Command;

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

@ -4,9 +4,9 @@
"use strict";
const EXPORTED_SYMBOLS = ["TestModule"];
const EXPORTED_SYMBOLS = ["command"];
class TestModule {
class Command {
constructor(messageHandler) {
this.messageHandler = messageHandler;
}
@ -23,10 +23,12 @@ class TestModule {
async testInterceptAndForwardModule(params, destination) {
const windowGlobalValue = await this.messageHandler.handleCommand({
moduleName: "TestModule",
moduleName: "command",
commandName: "testForwardToWindowGlobal",
destination,
});
return "intercepted-and-forward+" + windowGlobalValue;
}
}
const command = Command;

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

@ -4,9 +4,9 @@
"use strict";
const EXPORTED_SYMBOLS = ["TestModule"];
const EXPORTED_SYMBOLS = ["command"];
class TestModule {
class Command {
constructor(messageHandler) {
this.messageHandler = messageHandler;
}
@ -33,3 +33,5 @@ class TestModule {
return "forward-to-windowglobal-value";
}
}
const command = Command;

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

@ -4,9 +4,9 @@
"use strict";
const EXPORTED_SYMBOLS = ["TestOnlyInWindowGlobalModule"];
const EXPORTED_SYMBOLS = ["commandwindowglobalonly"];
class TestOnlyInWindowGlobalModule {
class CommandWindowGlobalOnly {
constructor(messageHandler) {
this.messageHandler = messageHandler;
}
@ -33,3 +33,5 @@ class TestOnlyInWindowGlobalModule {
throw new Error("error-from-module");
}
}
const commandwindowglobalonly = CommandWindowGlobalOnly;