When my little one went for an opthalmologist's appointment following a trauma to his head, I asked the same question. They told me they look at things like the speed of movement, how far they will follow a moving object, how well they focus on an object being moved towards and then away from their face, look for any obvious squinting and/or laziness in both eyes, and watch reactions when different objects are passed in front of their eyes.
The opthalmologist had pieces of white cardboard with black line drawings on them in various thicknesses, and pieces of black cardboard with the same in white. The drawings were in different positions on the card, so when she held them up she was looking to see which direction he looked in - i.e. if he had 'noticed' the drawing on the card.