Bug 1337133 - Remove references to pen and touch in test_action.js. r=jgraham, a=test-only
authorMaja Frydrychowicz <mjzffr@gmail.com>
Wed, 22 Feb 2017 16:57:55 -0500
changeset 378825 824f8566434bc79c88693a00d3c5075d23e4f584
parent 378824 e67838014e6bf0492e87b0d903a95eb05e62fd94
child 378826 4260c76cda6788acf8a75f8514677629142e7625
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham, test-only
bugs1337133
milestone53.0a2
Bug 1337133 - Remove references to pen and touch in test_action.js. r=jgraham, a=test-only Pen and touch support will be added this quarter. MozReview-Commit-ID: GH7CVNoDOIm
testing/marionette/test_action.js
--- 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",
     },
     {