--- a/testing/marionette/test_action.js
+++ b/testing/marionette/test_action.js
@@ -35,19 +35,19 @@ add_test(function test_processPointerPar
let check = (regex, message, arg) => checkErrors(
regex, action.PointerParameters.fromJson, [arg], message);
let parametersData;
for (let d of ["foo", "", "get", "Get"]) {
parametersData = {pointerType: d};
let message = `parametersData: [pointerType: ${parametersData.pointerType}]`;
check(/Unknown pointerType/, message, parametersData);
}
- parametersData.pointerType = "pen";
+ parametersData.pointerType = "mouse"; //TODO "pen";
deepEqual(action.PointerParameters.fromJson(parametersData),
- {pointerType: action.PointerType.Pen});
+ {pointerType: "mouse"}); //TODO action.PointerType.Pen});
run_next_test();
});
add_test(function test_processPointerUpDownAction() {
let actionItem = {type: "pointerDown"};
let actionSequence = {type: "pointer", id: "some_id"};
for (let d of [-1, "a"]) {
@@ -183,17 +183,17 @@ add_test(function test_processPointerMov
run_next_test();
});
add_test(function test_processPointerAction() {
let actionSequence = {
type: "pointer",
id: "some_id",
parameters: {
- pointerType: "touch"
+ pointerType: "mouse" //TODO "touch"
},
};
let actionItems = [
{
duration: 2000,
type: "pause",
},
{
@@ -320,17 +320,17 @@ add_test(function test_processInputSourc
add_test(function test_processInputSourceActionSequencePointer() {
let actionItem = {type: "pointerDown", button: 1};
let actionSequence = {
type: "pointer",
id: "9",
actions: [actionItem],
parameters: {
- pointerType: "pen"
+ pointerType: "mouse" // TODO "pen"
},
};
let expectedAction = new action.Action(
actionSequence.id, actionSequence.type, actionItem.type);
expectedAction.pointerType = actionSequence.parameters.pointerType;
expectedAction.button = actionItem.button;
let actions = action.Sequence.fromJson(actionSequence);
equal(actions.length, 1);
@@ -384,23 +384,24 @@ add_test(function test_processPointerAct
let wrongInputState = new action.InputState.Key();
action.inputStateMap.set(id, wrongInputState);
checkErrors(
/to be mapped to InputState whose type is/, action.processPointerAction,
[id, parameters, a],
`type "pointer" with ${wrongInputState.type} in inputState`);
action.inputStateMap.clear();
- wrongInputState = new action.InputState.Pointer("pen");
- action.inputStateMap.set(id, wrongInputState);
- checkErrors(
- /to be mapped to InputState whose subtype is/, action.processPointerAction,
- [id, parameters, a],
- `subtype ${parameters.pointerType} with ${wrongInputState.subtype} in inputState`);
- action.inputStateMap.clear();
+ // TODO - uncomment once pen is supported
+ //wrongInputState = new action.InputState.Pointer("pen");
+ //action.inputStateMap.set(id, wrongInputState);
+ //checkErrors(
+ // /to be mapped to InputState whose subtype is/, action.processPointerAction,
+ // [id, parameters, a],
+ // `subtype ${parameters.pointerType} with ${wrongInputState.subtype} in inputState`);
+ //action.inputStateMap.clear();
let rightInputState = new action.InputState.Pointer("mouse");
action.inputStateMap.set(id, rightInputState);
action.processPointerAction(id, parameters, a);
action.inputStateMap.clear();
run_next_test();
});
@@ -469,17 +470,17 @@ add_test(function test_extractActionChai
button: 2,
},
];
let mouseActionSequence = {
type: "pointer",
id: "7",
actions: mouseActionItems,
parameters: {
- pointerType: "touch"
+ pointerType: "mouse" //TODO "touch"
},
};
let keyActionItems = [
{
type: "keyDown",
value: "a",
},
{