Sounds like it might be a throttle position sensor (TPS). To test it use an analog ohm meter hooked to the sensor across pins A&B (disconnect the harness from the sensor). Now, watch the needle as you open and close the throttle. The needle should sweep across the scale in a smooth motion, no jumping around.