queryCommandState Method test sample