query: make all tests test in all three modes.

Change-Id: I945830ddb3bfe68a7223994b94d780b46503c95e